3636 ActuatorData ,
3737 ActuatorDataType ,
3838 ActuatorType ,
39- DeviceData ,
39+ DeviceZoneData ,
4040 GatewayData ,
4141 SensorType ,
4242 ThermoLoc ,
4343 ToggleNameType ,
44- ZoneData ,
4544)
4645from plugwise .exceptions import (
4746 ConnectionFailedError ,
@@ -251,7 +250,7 @@ def __init__(self) -> None:
251250
252251 self .gateway_id : str
253252 self .gw_data : GatewayData = {}
254- self .gw_devices : dict [str , DeviceData ] = {}
253+ self .gw_devices : dict [str , DeviceZoneData ] = {}
255254 self .loc_data : dict [str , ThermoLoc ]
256255 self .smile_fw_version : Version | None
257256 self .smile_hw_version : str | None
@@ -262,7 +261,7 @@ def __init__(self) -> None:
262261 self .smile_type : str
263262 self .smile_zigbee_mac_address : str | None
264263 self .therms_with_offset_func : list [str ] = []
265- self .zone_data : dict [str , ZoneData ] = {}
264+ self .zone_data : dict [str , DeviceZoneData ] = {}
266265 SmileCommon .__init__ (self )
267266
268267 def _all_appliances (self ) -> None :
@@ -483,12 +482,12 @@ def _get_appliances_with_offset_functionality(self) -> list[str]:
483482
484483 return therm_list
485484
486- def _get_zone_data (self , loc_id : str ) -> ZoneData :
485+ def _get_zone_data (self , loc_id : str ) -> DeviceZoneData :
487486 """Helper-function for smile.py: _get_device_data().
488487
489488 Collect the location-data based on location id.
490489 """
491- data : ZoneData = {"sensors" : {}}
490+ data : DeviceZoneData = {"sensors" : {}}
492491 zone = self .zone_data [loc_id ]
493492 measurements = ZONE_MEASUREMENTS
494493 if (
@@ -499,12 +498,12 @@ def _get_zone_data(self, loc_id: str) -> ZoneData:
499498
500499 return data
501500
502- def _get_measurement_data (self , dev_id : str ) -> DeviceData :
501+ def _get_measurement_data (self , dev_id : str ) -> DeviceZoneData :
503502 """Helper-function for smile.py: _get_device_data().
504503
505504 Collect the appliance-data based on device id.
506505 """
507- data : DeviceData = {"binary_sensors" : {}, "sensors" : {}, "switches" : {}}
506+ data : DeviceZoneData = {"binary_sensors" : {}, "sensors" : {}, "switches" : {}}
508507 # Get P1 smartmeter data from LOCATIONS
509508 device = self .gw_devices [dev_id ]
510509 # !! DON'T CHANGE below two if-lines, will break stuff !!
@@ -588,12 +587,12 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
588587
589588 return data
590589
591- def _power_data_from_location (self , loc_id : str ) -> DeviceData :
590+ def _power_data_from_location (self , loc_id : str ) -> DeviceZoneData :
592591 """Helper-function for smile.py: _get_device_data().
593592
594593 Collect the power-data based on Location ID, from LOCATIONS.
595594 """
596- direct_data : DeviceData = {"sensors" : {}}
595+ direct_data : DeviceZoneData = {"sensors" : {}}
597596 loc = Munch ()
598597 log_list : list [str ] = ["point_log" , "cumulative_log" , "interval_log" ]
599598 t_string = "tariff"
@@ -610,7 +609,7 @@ def _power_data_from_location(self, loc_id: str) -> DeviceData:
610609 def _appliance_measurements (
611610 self ,
612611 appliance : etree ,
613- data : DeviceData ,
612+ data : DeviceZoneData ,
614613 measurements : dict [str , DATA | UOM ],
615614 ) -> None :
616615 """Helper-function for _get_measurement_data() - collect appliance measurement data."""
@@ -648,7 +647,7 @@ def _appliance_measurements(
648647 self ._count += len (data ) - 3
649648
650649 def _get_toggle_state (
651- self , xml : etree , toggle : str , name : ToggleNameType , data : DeviceData
650+ self , xml : etree , toggle : str , name : ToggleNameType , data : DeviceZoneData
652651 ) -> None :
653652 """Helper-function for _get_measurement_data().
654653
@@ -677,7 +676,7 @@ def _get_plugwise_notifications(self) -> None:
677676 )
678677
679678 def _get_actuator_functionalities (
680- self , xml : etree , device : DeviceData , data : DeviceData
679+ self , xml : etree , device : DeviceZoneData , data : DeviceZoneData
681680 ) -> None :
682681 """Helper-function for _get_measurement_data()."""
683682 for item in ACTIVE_ACTUATORS :
@@ -732,7 +731,7 @@ def _get_actuator_functionalities(
732731 act_item = cast (ActuatorType , item )
733732 data [act_item ] = temp_dict
734733
735- def _get_regulation_mode (self , appliance : etree , data : DeviceData ) -> None :
734+ def _get_regulation_mode (self , appliance : etree , data : DeviceZoneData ) -> None :
736735 """Helper-function for _get_measurement_data().
737736
738737 Collect the gateway regulation_mode.
@@ -743,7 +742,7 @@ def _get_regulation_mode(self, appliance: etree, data: DeviceData) -> None:
743742 self ._count += 1
744743 self ._cooling_enabled = data ["select_regulation_mode" ] == "cooling"
745744
746- def _get_gateway_mode (self , appliance : etree , data : DeviceData ) -> None :
745+ def _get_gateway_mode (self , appliance : etree , data : DeviceZoneData ) -> None :
747746 """Helper-function for _get_measurement_data().
748747
749748 Collect the gateway mode.
@@ -766,7 +765,7 @@ def _object_value(self, obj_id: str, measurement: str) -> float | int | None:
766765
767766 return val
768767
769- def _process_c_heating_state (self , data : DeviceData ) -> None :
768+ def _process_c_heating_state (self , data : DeviceZoneData ) -> None :
770769 """Helper-function for _get_measurement_data().
771770
772771 Process the central_heating_state value.
@@ -794,7 +793,7 @@ def _process_c_heating_state(self, data: DeviceData) -> None:
794793 if self ._elga :
795794 data ["binary_sensors" ]["heating_state" ] = data ["c_heating_state" ]
796795
797- def _cleanup_data (self , data : DeviceData ) -> None :
796+ def _cleanup_data (self , data : DeviceZoneData ) -> None :
798797 """Helper-function for _get_measurement_data().
799798
800799 Clean up the data dict.
@@ -842,7 +841,7 @@ def _scan_thermostats(self) -> None:
842841 loc_id : {
843842 "dev_class" : "climate" ,
844843 "name" : loc_data ["name" ],
845- "members " : {"primary" : loc_data ["primary" ], "secondary" : loc_data ["secondary" ]}
844+ "thermostats " : {"primary" : loc_data ["primary" ], "secondary" : loc_data ["secondary" ]}
846845 }
847846 }
848847 )
@@ -869,7 +868,7 @@ def _rank_thermostat(
869868 thermo_matching : dict [str , int ],
870869 loc_id : str ,
871870 appliance_id : str ,
872- appliance_details : DeviceData ,
871+ appliance_details : DeviceZoneData ,
873872 ) -> None :
874873 """Helper-function for _scan_thermostats().
875874
0 commit comments