Compare commits

..

1 Commits
0.1.0 ... 0.1.1

Author SHA1 Message Date
Jean-Marc Collin
bb7322854e FIX exception when power is not retrieved at first run 2023-01-02 15:59:57 +01:00

View File

@@ -810,7 +810,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: