@@ -931,14 +931,10 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
931931 data .update (self ._get_lock_state (appliance ))
932932 for toggle , name in TOGGLES .items ():
933933 if self ._get_toggle_state (appliance , toggle , name ) is not None :
934- LOGGER .debug (
935- "HOI %s " , self ._get_toggle_state (appliance , toggle , name )
936- )
937934 data .update (self ._get_toggle_state (appliance , toggle , name ))
938935
939- if (appl_type := appliance .find ("type" )) is not None :
940- if appl_type .text in ACTUATOR_CLASSES :
941- data .update (_get_actuator_functionalities (appliance ))
936+ if appliance .find ("type" ).text in ACTUATOR_CLASSES :
937+ data .update (_get_actuator_functionalities (appliance ))
942938
943939 # Collect availability-status for wireless connected devices to Adam
944940 self ._wireless_availablity (appliance , data )
@@ -979,9 +975,10 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
979975 self ._cooling_active = data ["elga_status_code" ] == 8
980976 data .pop ("elga_status_code" , None )
981977 # Loria/Thermastate: look at cooling_state, not at cooling_enabled, not available on R32!
982- elif "cooling_ena_switch" in data :
983- self ._cooling_enabled = data ["cooling_ena_switch" ]
984- self ._cooling_active = data ["cooling_state" ]
978+ for item in ("cooling_ena_switch" , "cooling_enabled" ):
979+ if item in data :
980+ self ._cooling_enabled = data [item ]
981+ self ._cooling_active = data ["cooling_state" ]
985982
986983 # Don't show cooling_state when no cooling present
987984 if not self ._cooling_present and "cooling_state" in data :
0 commit comments