@@ -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 .zone_data : dict [str , GwEntityData ] = {}
264+ self .zones : dict [str , GwEntityData ] = {}
265265 SmileCommon .__init__ (self )
266266
267267 def _all_appliances (self ) -> None :
@@ -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 .zone_data [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 } "]' )
@@ -552,7 +552,7 @@ def _power_data_from_location(self, loc_id: str) -> GwEntityData:
552552
553553 Collect the power-data based on Location ID, from LOCATIONS.
554554 """
555- direct_data : GwEntityData = {"sensors" : {}}
555+ data : GwEntityData = {"sensors" : {}}
556556 loc = Munch ()
557557 log_list : list [str ] = ["point_log" , "cumulative_log" , "interval_log" ]
558558 t_string = "tariff"
@@ -561,10 +561,10 @@ def _power_data_from_location(self, loc_id: str) -> GwEntityData:
561561 loc .logs = search .find (f'./location[@id="{ loc_id } "]/logs' )
562562 for loc .measurement , loc .attrs in P1_MEASUREMENTS .items ():
563563 for loc .log_type in log_list :
564- self ._collect_power_values (direct_data , loc , t_string )
564+ self ._collect_power_values (data , loc , t_string )
565565
566- self ._count += len (direct_data ["sensors" ])
567- return direct_data
566+ self ._count += len (data ["sensors" ])
567+ return data
568568
569569 def _appliance_measurements (
570570 self ,
@@ -866,7 +866,7 @@ def _scan_thermostats(self) -> None:
866866
867867 for loc_id , loc_data in list (self ._thermo_locs .items ()):
868868 if loc_data ["primary_prio" ] != 0 :
869- self .zone_data [loc_id ] = {
869+ self .zones [loc_id ] = {
870870 "dev_class" : "climate" ,
871871 "name" : loc_data ["name" ],
872872 "thermostats" : {"primary" : loc_data ["primary" ], "secondary" : loc_data ["secondary" ]}
0 commit comments