@@ -80,7 +80,7 @@ def __init__(self) -> None:
8080
8181 self .gateway_id : str
8282 self .gw_data : GatewayData = {}
83- self .gw_devices : dict [str , DeviceZoneData ] = {}
83+ self .gw_device_zones : dict [str , DeviceZoneData ] = {}
8484 self .loc_data : dict [str , ThermoLoc ]
8585 self .smile_fw_version : Version | None
8686 self .smile_hw_version : str | None
@@ -143,17 +143,17 @@ def _all_appliances(self) -> None:
143143 if appl .pwclass == "heater_central" and appl .dev_id != self ._heater_id :
144144 continue # pragma: no cover
145145
146- self ._create_gw_devices (appl )
146+ self ._create_gw_device_zones (appl )
147147
148148 # Place the gateway and optional heater_central devices as 1st and 2nd
149149 for dev_class in ("heater_central" , "gateway" ):
150- for dev_id , device in dict (self .gw_devices ).items ():
150+ for dev_id , device in dict (self .gw_device_zones ).items ():
151151 if device ["dev_class" ] == dev_class :
152152 tmp_device = device
153- self .gw_devices .pop (dev_id )
154- cleared_dict = self .gw_devices
153+ self .gw_device_zones .pop (dev_id )
154+ cleared_dict = self .gw_device_zones
155155 add_to_front = {dev_id : tmp_device }
156- self .gw_devices = {** add_to_front , ** cleared_dict }
156+ self .gw_device_zones = {** add_to_front , ** cleared_dict }
157157
158158 def _all_locations (self ) -> None :
159159 """Collect all locations."""
@@ -194,7 +194,7 @@ def _create_legacy_gateway(self) -> None:
194194 if self .smile_type == "power" :
195195 self .gateway_id = FAKE_APPL
196196
197- self .gw_devices [self .gateway_id ] = {"dev_class" : "gateway" }
197+ self .gw_device_zones [self .gateway_id ] = {"dev_class" : "gateway" }
198198 self ._count += 1
199199 for key , value in {
200200 "firmware" : str (self .smile_fw_version ),
@@ -207,7 +207,7 @@ def _create_legacy_gateway(self) -> None:
207207 }.items ():
208208 if value is not None :
209209 gw_key = cast (ApplianceType , key )
210- self .gw_devices [self .gateway_id ][gw_key ] = value
210+ self .gw_device_zones [self .gateway_id ][gw_key ] = value
211211 self ._count += 1
212212
213213 def _appliance_info_finder (self , appliance : etree , appl : Munch ) -> Munch :
@@ -265,7 +265,7 @@ def _p1_smartmeter_info_finder(self, appl: Munch) -> None:
265265 location = self ._locations .find (f'./location[@id="{ loc_id } "]' )
266266 appl = self ._energy_device_info_finder (location , appl )
267267
268- self ._create_gw_devices (appl )
268+ self ._create_gw_device_zones (appl )
269269
270270 def _get_measurement_data (self , dev_id : str ) -> DeviceZoneData :
271271 """Helper-function for smile.py: _get_device_data().
@@ -274,7 +274,7 @@ def _get_measurement_data(self, dev_id: str) -> DeviceZoneData:
274274 """
275275 data : DeviceZoneData = {"binary_sensors" : {}, "sensors" : {}, "switches" : {}}
276276 # Get P1 smartmeter data from LOCATIONS or MODULES
277- device = self .gw_devices [dev_id ]
277+ device = self .gw_device_zones [dev_id ]
278278 # !! DON'T CHANGE below two if-lines, will break stuff !!
279279 if self .smile_type == "power" :
280280 if device ["dev_class" ] == "smartmeter" :
0 commit comments