Skip to content

Fix thermostat rounding and Sinope polling idempotency - #830

Draft
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-688
Draft

Fix thermostat rounding and Sinope polling idempotency#830
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-688

Conversation

@dmulcahey

@dmulcahey dmulcahey commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Converting a requested thermostat setpoint with int(value * 100) can lose a centidegree to floating-point representation (for example, 19.9 becomes 1989). Use round() for heating/cooling and occupied/away setpoints, with positive and negative precision coverage.

Sinope time updates also need one task across repeated enable/disable calls. Keep ownership until cancellation finishes, restart only if re-enabled, and prevent restarts after entity removal. Lifecycle tests cover repeated enable, rapid disable/re-enable, and removal while cancellation is pending.

Supersedes #688.

Validation against dev at 66603431339afe37fa0048b70ff31d77dceb8f95: Python 3.12 full suite, 1384 passed, coverage above the 95% project gate; full pre-commit (codespell, Ruff, formatting, mypy, lock check) passed. Relevant regression checks fail on the unchanged base. GitHub CI for Python 3.12/3.13/3.14 is reported separately on the PR.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.20%. Comparing base (6660343) to head (c31c6f0).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #830   +/-   ##
=======================================
  Coverage   97.19%   97.20%           
=======================================
  Files          57       57           
  Lines       10560    10573   +13     
=======================================
+ Hits        10264    10277   +13     
  Misses        296      296           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmulcahey dmulcahey changed the title Codex updated: Fix thermostat rounding and Sinope polling idempotency Fix thermostat rounding and Sinope polling idempotency Sep 5, 2026
@dmulcahey
dmulcahey force-pushed the codex-updated-pr-688 branch from 7a51205 to c31c6f0 Compare September 5, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant