@@ -480,7 +480,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch:
480480 appl .model = appl .name = self .smile_name
481481 appl .v_name = "Plugwise B.V."
482482
483- # Adam: check for ZigBee mac address
483+ # Adam: look for the ZigBee MAC address of the Smile
484484 if self .smile_name == "Adam" and (
485485 found := self ._modules .find (".//protocols/zig_bee_coordinator" )
486486 ):
@@ -700,15 +700,13 @@ def _match_locations(self) -> dict[str, Any]:
700700
701701 def _control_state (self , loc_id : str ) -> str | None :
702702 """Helper-function for _device_data_adam().
703- Adam: find the thermostat control_state of a location, from LOCATIONS .
703+ Adam: find the thermostat control_state of a location, from DOMAIN_OBJECTS .
704704 Represents the heating/cooling demand-state of the local master thermostat.
705705 Note: heating or cooling can still be active when the setpoint has been reached.
706706 """
707707 locator = f'location[@id="{ loc_id } "]'
708- if (location := self ._locations .find (locator )) is not None :
709- locator = (
710- ".//actuator_functionalities/thermostat_functionality/control_state"
711- )
708+ if (location := self ._domain_objects .find (locator )) is not None :
709+ locator = './/actuator_functionalities/thermostat_functionality[type="thermostat"]/control_state'
712710 if (ctrl_state := location .find (locator )) is not None :
713711 return ctrl_state .text
714712
@@ -1085,7 +1083,7 @@ def _power_data_peak_value(self, loc: str) -> Munch:
10851083
10861084 def _power_data_from_location (self , loc_id : str ) -> dict [str , Any ] | None :
10871085 """Helper-function for smile.py: _get_device_data().
1088- Collect the power-data based on Location ID.
1086+ Collect the power-data based on Location ID, from LOCATIONS .
10891087 """
10901088 direct_data : dict [str , any ] = {}
10911089 loc = Munch ()
@@ -1250,10 +1248,10 @@ def _last_used_schedule(self, loc_id: str, rule_ids: dict[str]) -> str | None:
12501248
12511249 def _object_value (self , obj_id : str , measurement : str ) -> float | int | bool | None :
12521250 """Helper-function for smile.py: _get_device_data() and _device_data_anna().
1253- Obtain the value/state for the given object.
1251+ Obtain the value/state for the given object from DOMAIN_OBJECTS .
12541252 """
12551253 val : float | int | None = None
1256- search = self ._locations
1254+ search = self ._domain_objects
12571255 locator = (
12581256 f'.//location[@id="{ obj_id } "]/logs/point_log'
12591257 f'[type="{ measurement } "]/period/measurement'
0 commit comments