Skip to content

Map hvac_action from currentState for 24V thermostats - #494

Open
etiennnr wants to merge 1 commit into
dvd-dev:mainfrom
etiennnr:feature/hvac-action-low-voltage
Open

etiennnr wants to merge 1 commit into
dvd-dev:mainfrom
etiennnr:feature/hvac-action-low-voltage

Conversation

@etiennnr

@etiennnr etiennnr commented Nov 5, 2026 •

Copy link
Copy Markdown

Closes dvd-dev/hilo#1122.

What

hvac_action on Climate now returns the correct action for 24 V (low-voltage) thermostats by reading currentState directly, instead of the power-based heuristic that only works for baseboard heaters.

currentState (API) hvac_action
HEATING heating
COOLING cooling
OFF idle
absent / unknown idle

Baseboard thermostats are unaffected — the existing heating > 0 path is kept in the else branch.

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 TestHvacAction cover all four currentState values for 24 V and both power states for baseboard.

Also testing in HA with successful results
image

image

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
etiennnr marked this pull request as ready for review November 5, 2026 02:04
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.

hvac_action ne change pas pour les thermostats 24V

1 participant