Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for HVAC_Action HVAC_Mode Missmatch #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JackGlobetrotter
Copy link

Some thermostats (like _TZE200_hue3yfsn) will always report HVAC_Action as Heating regardless of the current state.
As a consequence state[ATTR_TEMPERATURE] is None which leads to the following error

2025-01-23 17:16:36.480 ERROR (Recorder) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/zoned_heating/switch.py", line 203, in async_zone_state_changed
    await self.async_calculate_override()
  File "/config/custom_components/zoned_heating/switch.py", line 209, in async_calculate_override
    await self.async_calculate_override_offset()
  File "/config/custom_components/zoned_heating/switch.py", line 262, in async_calculate_override_offset
    state[ATTR_TEMPERATURE] - state[ATTR_CURRENT_TEMPERATURE]

This PR addresses that issue by also checking HVAC_MODE which represents the real state (off when the thermostat is turned off, heat for heating).

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