We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2111976 commit 95c5cf9Copy full SHA for 95c5cf9
1 file changed
custom_components/versatile_thermostat/climate.py
@@ -789,7 +789,9 @@ async def _async_power_changed(self, event):
789
_LOGGER.debug(event)
790
new_state = event.data.get("new_state")
791
old_state = event.data.get("old_state")
792
- if new_state is None or new_state.state == old_state.state:
+ if new_state is None or (
793
+ old_state is not None and new_state.state == old_state.state
794
+ ):
795
return
796
797
try:
@@ -896,7 +898,7 @@ async def _async_control_heating(self, time=None):
896
898
self._async_cancel_cycle = None
897
899
await self._async_heater_turn_off()
900
- if self._hvac_mode == HVAC_MODE_HEAT:
901
+ if self._hvac_mode == HVAC_MODE_HEAT and on_time_sec > 0:
902
_LOGGER.info(
903
"%s - start heating for %d min %d sec ",
904
self,
0 commit comments