Compare commits

...

2 Commits

Author SHA1 Message Date
Jean-Marc Collin 95c5cf94c2 FIX exception when temperature state is not retrieved
FIX start heating for 0 sec
2023-01-02 15:48:10 +01:00
Jean-Marc Collin 21119763af Update README.md
FIX hacs badge
2023-01-02 14:30:47 +01:00
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[![GitHub Release][releases-shield]][releases]
[![GitHub Activity][commits-shield]][commits]
[![License][license-shield]](LICENSE)
[![hacs][hacsbadge]][hacs]
[![hacs][hacs_badge]][hacs]
_Component developed by using the amazing development template [blueprint][blueprint]._
@@ -789,7 +789,9 @@ class VersatileThermostat(ClimateEntity, RestoreEntity):
_LOGGER.debug(event)
new_state = event.data.get("new_state")
old_state = event.data.get("old_state")
if new_state is None or new_state.state == old_state.state:
if new_state is None or (
old_state is not None and new_state.state == old_state.state
):
return
try:
@@ -896,7 +898,7 @@ class VersatileThermostat(ClimateEntity, RestoreEntity):
self._async_cancel_cycle = None
await self._async_heater_turn_off()
if self._hvac_mode == HVAC_MODE_HEAT:
if self._hvac_mode == HVAC_MODE_HEAT and on_time_sec > 0:
_LOGGER.info(
"%s - start heating for %d min %d sec ",
self,