@@ -214,7 +214,7 @@ def __init__(self) -> None:
214214 self ._thermo_locs : dict [str , ThermoLoc ] = {}
215215 ###################################################################
216216 # '_cooling_enabled' can refer to the state of the Elga heatpump
217- # connected to an Anna. For Elga, 'elga_status_code' in [ 8, 9]
217+ # connected to an Anna. For Elga, 'elga_status_code' in ( 8, 9)
218218 # means cooling mode is available, next to heating mode.
219219 # 'elga_status_code' = 8 means cooling is active, 9 means idle.
220220 #
@@ -523,7 +523,7 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
523523 # Techneco Elga has cooling-capability
524524 self ._cooling_present = True
525525 data ["model" ] = "Generic heater/cooler"
526- self ._cooling_enabled = data ["elga_status_code" ] in [ 8 , 9 ]
526+ self ._cooling_enabled = data ["elga_status_code" ] in ( 8 , 9 )
527527 data ["binary_sensors" ]["cooling_state" ] = self ._cooling_active = (
528528 data ["elga_status_code" ] == 8
529529 )
@@ -590,7 +590,7 @@ def _appliance_measurements(
590590 data ["select_dhw_mode" ] = appl_p_loc .text
591591 case _ as measurement if measurement in BINARY_SENSORS :
592592 bs_key = cast (BinarySensorType , measurement )
593- bs_value = appl_p_loc .text in [ "on" , "true" ]
593+ bs_value = appl_p_loc .text in ( "on" , "true" )
594594 data ["binary_sensors" ][bs_key ] = bs_value
595595 case _ as measurement if measurement in SENSORS :
596596 s_key = cast (SensorType , measurement )
@@ -600,11 +600,11 @@ def _appliance_measurements(
600600 data ["sensors" ][s_key ] = s_value
601601 case _ as measurement if measurement in SWITCHES :
602602 sw_key = cast (SwitchType , measurement )
603- sw_value = appl_p_loc .text in [ "on" , "true" ]
603+ sw_value = appl_p_loc .text in ( "on" , "true" )
604604 data ["switches" ][sw_key ] = sw_value
605605 case _ as measurement if measurement in SPECIALS :
606606 sp_key = cast (SpecialType , measurement )
607- sp_value = appl_p_loc .text in [ "on" , "true" ]
607+ sp_value = appl_p_loc .text in ( "on" , "true" )
608608 data [sp_key ] = sp_value
609609 case "elga_status_code" :
610610 data ["elga_status_code" ] = int (appl_p_loc .text )
0 commit comments