@@ -189,7 +189,7 @@ def __init__(
189189 username : str ,
190190 port : int ,
191191 timeout : float ,
192- websession : ClientSession ,
192+ websession : ClientSession | None ,
193193 ):
194194 """Set the constructor for this class."""
195195 if not websession :
@@ -291,10 +291,10 @@ def __init__(self) -> None:
291291 self ._appliances : etree
292292 self ._allowed_modes : list [str ] = []
293293 self ._anna_cooling_present : bool = False
294- self ._cooling_activation_outdoor_temp : float | None = None
295- self ._cooling_deactivation_threshold : float | None = None
294+ self ._cooling_activation_outdoor_temp : float
295+ self ._cooling_deactivation_threshold : float
296296 self ._cooling_present = False
297- self ._devices : dict [str , str ] = {}
297+ self ._devices : dict [str , dict [ str , Any ]]
298298 self ._domain_objects : etree
299299 self ._heater_id : str | None = None
300300 self ._home_location : str
@@ -305,7 +305,7 @@ def __init__(self) -> None:
305305 self ._modules : etree
306306 self ._on_off_device = False
307307 self ._opentherm_device = False
308- self ._outdoor_temp : float | None = None
308+ self ._outdoor_temp : float
309309 self ._smile_legacy = False
310310 self ._stretch_v2 = False
311311 self ._stretch_v3 = False
@@ -320,7 +320,7 @@ def __init__(self) -> None:
320320 self .smile_mac_address : str | None = None
321321 self .smile_name : str | None = None
322322 self .smile_type : str | None = None
323- self .smile_version : list [str ] = [ ]
323+ self .smile_version : tuple [str , Any ]
324324 self .smile_zigbee_mac_address : str | None = None
325325
326326 def _locations_legacy (self ) -> None :
@@ -831,11 +831,11 @@ def _appliance_measurements(
831831 # Use the local outdoor temperature as reference for turning cooling on/off
832832 if measurement == "cooling_activation_outdoor_temperature" :
833833 self ._anna_cooling_present = self ._cooling_present = True
834- self ._cooling_activation_outdoor_temp = data . get ( measurement )
834+ self ._cooling_activation_outdoor_temp = data [ measurement ]
835835 if measurement == "cooling_deactivation_threshold" :
836- self ._cooling_deactivation_threshold = data . get ( measurement )
836+ self ._cooling_deactivation_threshold = data [ measurement ]
837837 if measurement == "outdoor_air_temperature" :
838- self ._outdoor_temp = data . get ( measurement )
838+ self ._outdoor_temp = data [ measurement ]
839839
840840 i_locator = f'.//logs/interval_log[type="{ measurement } "]/period/measurement'
841841 if (appl_i_loc := appliance .find (i_locator )) is not None :
0 commit comments