@@ -224,6 +224,7 @@ def __init__(self) -> None:
224224 self ._is_thermostat : bool
225225 self ._last_active : dict [str , str | None ]
226226 self ._last_modified : dict [str , str ] = {}
227+ self ._loc_data : dict [str , ThermoLoc ]
227228 self ._notifications : dict [str , dict [str , str ]] = {}
228229 self ._on_off_device : bool
229230 self ._opentherm_device : bool
@@ -251,7 +252,6 @@ def __init__(self) -> None:
251252 self .gateway_id : str
252253 self .gw_data : GatewayData = {}
253254 self .gw_entities : dict [str , GwEntityData ] = {}
254- self .loc_data : dict [str , ThermoLoc ]
255255 self .smile_fw_version : Version | None
256256 self .smile_hw_version : str | None
257257 self .smile_mac_address : str | None
@@ -261,7 +261,7 @@ def __init__(self) -> None:
261261 self .smile_type : str
262262 self .smile_zigbee_mac_address : str | None
263263 self .therms_with_offset_func : list [str ] = []
264- self .zones : dict [str , GwEntityData ] = {}
264+ self ._zones : dict [str , GwEntityData ] = {}
265265 SmileCommon .__init__ (self )
266266
267267 def _all_appliances (self ) -> None :
@@ -354,11 +354,11 @@ def _all_locations(self) -> None:
354354 if loc .name == "Home" :
355355 self ._home_location = loc .loc_id
356356
357- self .loc_data [loc .loc_id ] = {"name" : loc .name }
357+ self ._loc_data [loc .loc_id ] = {"name" : loc .name }
358358
359359 def _p1_smartmeter_info_finder (self , appl : Munch ) -> None :
360360 """Collect P1 DSMR SmartMeter info."""
361- loc_id = next (iter (self .loc_data .keys ()))
361+ loc_id = next (iter (self ._loc_data .keys ()))
362362 location = self ._domain_objects .find (f'./location[@id="{ loc_id } "]' )
363363 locator = MODULE_LOCATOR
364364 module_data = self ._get_module_data (location , locator )
@@ -488,7 +488,7 @@ def _get_zone_data(self, loc_id: str) -> GwEntityData:
488488 Collect the location-data based on location id.
489489 """
490490 data : GwEntityData = {"sensors" : {}}
491- zone = self .zones [loc_id ]
491+ zone = self ._zones [loc_id ]
492492 measurements = ZONE_MEASUREMENTS
493493 if (
494494 location := self ._domain_objects .find (f'./location[@id="{ loc_id } "]' )
@@ -861,7 +861,7 @@ def _scan_thermostats(self) -> None:
861861
862862 for loc_id , loc_data in list (self ._thermo_locs .items ()):
863863 if loc_data ["primary_prio" ] != 0 :
864- self .zones [loc_id ] = {
864+ self ._zones [loc_id ] = {
865865 "dev_class" : "climate" ,
866866 "name" : loc_data ["name" ],
867867 "thermostats" : {"primary" : loc_data ["primary" ], "secondary" : loc_data ["secondary" ]}
@@ -874,7 +874,7 @@ def _match_locations(self) -> dict[str, ThermoLoc]:
874874 Match appliances with locations.
875875 """
876876 matched_locations : dict [str , ThermoLoc ] = {}
877- for location_id , location_details in self .loc_data .items ():
877+ for location_id , location_details in self ._loc_data .items ():
878878 for appliance_details in self .gw_entities .values ():
879879 if appliance_details ["location" ] == location_id :
880880 location_details .update (
0 commit comments