File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -313,12 +313,14 @@ def _get_anna_control_state(self, data: GwEntityData) -> None:
313313 """Set the thermostat control_state based on the opentherm/onoff device state."""
314314 data ["control_state" ] = "idle"
315315 for entity_id in self .gw_entities :
316- if self .gw_entities [entity_id ]["dev_class" ] != "heater_central" :
316+ entity = self .gw_entities [entity_id ]
317+ if entity ["dev_class" ] != "heater_central" :
317318 continue
318319
319- if self .gw_entities [entity_id ]["binary_sensors" ]["heating_state" ]:
320+ binary_sensors = entity ["binary_sensors" ]
321+ if binary_sensors ["heating_state" ]:
320322 data ["control_state" ] = "heating"
321- if self . gw_entities [ entity_id ][ " binary_sensors" ] .get ("cooling_state" ):
323+ if binary_sensors .get ("cooling_state" ):
322324 data ["control_state" ] = "cooling"
323325
324326 def _get_schedule_states_with_off (
You can’t perform that action at this time.
0 commit comments