File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ def __init__(self) -> None:
311311 self ._stretch_v3 = False
312312 self ._thermo_locs : dict [str , ThermoLoc ] = {}
313313
314- self .anna_no_cooling_enabled = True
314+ self .anna_no_cooling_enabled : bool | None = None
315315 self .gateway_id : str
316316 self .gw_data : GatewayData = {}
317317 self .gw_devices : dict [str , DeviceData ] = {}
@@ -853,8 +853,10 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
853853 data .pop ("heating_state" , None )
854854
855855 # Use cooling_enabled to set self.anna_no_cooling_enabled to False, then remove
856- if "cooling_enabled" in data :
857- self .anna_no_cooling_enabled = False
856+ if self ._anna_cooling_present :
857+ self .anna_no_cooling_enabled = True
858+ if "cooling_enabled" in data :
859+ self .anna_no_cooling_enabled = False
858860 data .pop ("cooling_enabled" , None )
859861
860862 return data
Original file line number Diff line number Diff line change @@ -86,15 +86,16 @@ def get_all_devices(self) -> None:
8686 self ._on_off_device = onoff_boiler is not None
8787 self ._opentherm_device = open_therm_boiler is not None
8888
89- # Determine if the Adam or Anna had cooling capability
89+ # Determine if the Adam or Anna has cooling capability
9090 locator = "./gateway/features/cooling"
91- self . _anna_cooling_present = adam_cooling_present = (
91+ anna_cooling_present_1 = adam_cooling_present = (
9292 self ._domain_objects .find (locator ) is not None
9393 )
9494 # Alternative method for the Anna with Elga
9595 locator_2 = "./gateway/features/elga_support"
96+ anna_cooling_present_2 = self ._domain_objects .find (locator_2 ) is not None
9697 self ._anna_cooling_present = (
97- self . _domain_objects . find ( locator_2 ) is not None
98+ anna_cooling_present_1 or anna_cooling_present_2
9899 )
99100 self ._cooling_present = self ._anna_cooling_present or adam_cooling_present
100101
You can’t perform that action at this time.
0 commit comments