Repository navigation
Conversation
Baseboard thermostats can only heat, so the power-based heuristic
(heating > 0 → "heating") has always been sufficient. 24V thermostats
report a currentState field ("HEATING", "COOLING", "OFF") that carries
the actual running state directly, making the power heuristic both
unreliable and incomplete (it cannot express cooling).
Branch hvac_action on is_low_voltage: use currentState for 24V devices
and keep the existing power logic for baseboard devices. Vocabulary
confirmed by live observation against a real Sinopé 24V thermostat
(issue dvd-dev/hilo#1122).
etiennnr
marked this pull request as ready for review
November 5, 2026 02:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes dvd-dev/hilo#1122.
What
hvac_actiononClimatenow returns the correct action for 24 V (low-voltage) thermostats by readingcurrentStatedirectly, instead of the power-based heuristic that only works for baseboard heaters.currentState(API)hvac_actionHEATINGheatingCOOLINGcoolingOFFidleidleBaseboard thermostats are unaffected — the existing
heating > 0path is kept in theelsebranch.Why
24 V thermostats report
currentState("HEATING", "COOLING", "OFF") via the GraphQL SSE subscription. The old heuristic (heating > 0 → "heating") cannot express cooling and was unreliable for these devices. The vocabulary was confirmed by live observation against a real Sinopé 24 V thermostat with all three states triggered manually (see dvd-dev/hilo#1122 (comment)).Tests
Six new parametrized tests in
TestHvacActioncover all fourcurrentStatevalues for 24 V and both power states for baseboard.Also testing in HA with successful results
