1515 ADAM ,
1616 ANNA ,
1717 ATTR_NAME ,
18- CLIMATE_MEASUREMENTS ,
1918 DATA ,
2019 DEVICE_MEASUREMENTS ,
2120 DHW_SETPOINT ,
3332 THERMOSTAT_CLASSES ,
3433 TOGGLES ,
3534 UOM ,
35+ ZONE_MEASUREMENTS ,
3636 ActuatorData ,
3737 ActuatorDataType ,
3838 ActuatorType ,
39- ClimateData ,
4039 DeviceData ,
4140 GatewayData ,
4241 SensorType ,
4342 ThermoLoc ,
4443 ToggleNameType ,
44+ ZoneData ,
4545)
4646from plugwise .exceptions import (
4747 ConnectionFailedError ,
@@ -250,7 +250,6 @@ def __init__(self) -> None:
250250 self ._cooling_enabled = False
251251
252252 self .gateway_id : str
253- self .climate_data : ClimateData = {}
254253 self .gw_data : GatewayData = {}
255254 self .gw_devices : dict [str , DeviceData ] = {}
256255 self .loc_data : dict [str , ThermoLoc ]
@@ -263,6 +262,7 @@ def __init__(self) -> None:
263262 self .smile_type : str
264263 self .smile_zigbee_mac_address : str | None
265264 self .therms_with_offset_func : list [str ] = []
265+ self .zone_data : ZoneData = {}
266266 SmileCommon .__init__ (self )
267267
268268 def _all_appliances (self ) -> None :
@@ -483,19 +483,19 @@ def _get_appliances_with_offset_functionality(self) -> list[str]:
483483
484484 return therm_list
485485
486- def _get_climate_data (self , loc_id : str ) -> ClimateData :
486+ def _get_zone_data (self , loc_id : str ) -> ZoneData :
487487 """Helper-function for smile.py: _get_device_data().
488488
489489 Collect the location-data based on location id.
490490 """
491- data : ClimateData = {"sensors" : {}}
492- climate = self .climate_data [loc_id ]
493- measurements = CLIMATE_MEASUREMENTS
491+ data : ZoneData = {"sensors" : {}}
492+ zone = self .zone_data [loc_id ]
493+ measurements = ZONE_MEASUREMENTS
494494 if (
495495 location := self ._domain_objects .find (f'./location[@id="{ loc_id } "]' )
496496 ) is not None :
497497 self ._appliance_measurements (location , data , measurements )
498- self ._get_actuator_functionalities (location , climate , data )
498+ self ._get_actuator_functionalities (location , zone , data )
499499
500500 return data
501501
@@ -682,7 +682,7 @@ def _get_actuator_functionalities(
682682 """Helper-function for _get_measurement_data()."""
683683 for item in ACTIVE_ACTUATORS :
684684 # Skip max_dhw_temperature, not initially valid,
685- # skip thermostat for all but climates
685+ # skip thermostat for all but zones with thermostats
686686 if item == "max_dhw_temperature" or (
687687 item == "thermostat" and device ["dev_class" ] != "climate"
688688 ):
@@ -835,7 +835,7 @@ def _scan_thermostats(self) -> None:
835835
836836 for loc_id , loc_data in list (self ._thermo_locs .items ()):
837837 if loc_data ["primary_prio" ] != 0 :
838- self .climate_data .update (
838+ self .zone_data .update (
839839 {
840840 loc_id : {
841841 "dev_class" : "climate" ,
@@ -845,11 +845,6 @@ def _scan_thermostats(self) -> None:
845845 }
846846 )
847847
848- # All thermostat appliances can keep their device_class but must not become climate-entities in HA.
849- # For each _thermo_loc a special climate-device must be created, with setpoint and temperature taken from the thermostat appliance with the lowest reported temperature.
850- # Also the corresponding device_id must be available, and updated, as an attribute.
851- # And the other attributes must be taken from the _thermo_loc.
852-
853848 def _match_locations (self ) -> dict [str , ThermoLoc ]:
854849 """Helper-function for _scan_thermostats().
855850
0 commit comments