FIX exception when power is not retrieved at first run
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user