@@ -231,7 +231,6 @@ def __init__(self) -> None:
231231 self ._is_thermostat = False
232232 self ._last_active : dict [str , str | None ] = {}
233233 self ._last_modified : dict [str , str ] = {}
234- self ._loc_data : dict [str , ThermoLoc ] = {}
235234 self ._notifications : dict [str , dict [str , str ]] = {}
236235 self ._on_off_device = False
237236 self ._opentherm_device = False
@@ -263,6 +262,7 @@ def __init__(self) -> None:
263262 self .gateway_id : str
264263 self .gw_data : GatewayData = {}
265264 self .gw_devices : dict [str , DeviceData ] = {}
265+ self .loc_data : dict [str , ThermoLoc ]
266266 self .smile_fw_version : str | None = None
267267 self .smile_hw_version : str | None = None
268268 self .smile_mac_address : str | None = None
@@ -286,7 +286,7 @@ def _all_locations(self) -> None:
286286 if loc .name == "Home" :
287287 self ._home_location = loc .loc_id
288288
289- self ._loc_data [loc .loc_id ] = {"name" : loc .name }
289+ self .loc_data [loc .loc_id ] = {"name" : loc .name }
290290
291291 def _get_module_data (
292292 self , appliance : etree , locator : str , mod_type : str
@@ -491,7 +491,7 @@ def _check_heater_central(self) -> str:
491491
492492 def _p1_smartmeter_info_finder (self , appl : Munch ) -> None :
493493 """Collect P1 DSMR Smartmeter info."""
494- loc_id = next (iter (self ._loc_data .keys ()))
494+ loc_id = next (iter (self .loc_data .keys ()))
495495 appl .dev_id = self .gateway_id
496496 appl .location = loc_id
497497 appl .mac = None
@@ -1039,7 +1039,7 @@ def _match_locations(self) -> dict[str, ThermoLoc]:
10391039 Match appliances with locations.
10401040 """
10411041 matched_locations : dict [str , ThermoLoc ] = {}
1042- for location_id , location_details in self ._loc_data .items ():
1042+ for location_id , location_details in self .loc_data .items ():
10431043 for appliance_details in self .gw_devices .values ():
10441044 if appliance_details ["location" ] == location_id :
10451045 location_details .update (
0 commit comments