@@ -297,9 +297,7 @@ def _get_measurement_data(self, entity_id: str) -> GwEntityData:
297297 # Adam & Anna: the Smile outdoor_temperature is present in DOMAIN_OBJECTS and LOCATIONS - under Home
298298 # The outdoor_temperature present in APPLIANCES is a local sensor connected to the active device
299299 if self ._is_thermostat and entity_id == self .gateway_id :
300- outdoor_temperature = self ._object_value (
301- self ._home_loc_id , "outdoor_temperature"
302- )
300+ outdoor_temperature = self ._home_loc_value ("outdoor_temperature" )
303301 if outdoor_temperature is not None :
304302 data .update ({"sensors" : {"outdoor_temperature" : outdoor_temperature }})
305303 self ._count += 1
@@ -396,14 +394,14 @@ def _get_actuator_functionalities(
396394 act_item = cast (ActuatorType , item )
397395 data [act_item ] = temp_dict
398396
399- def _object_value (self , obj_id : str , measurement : str ) -> float | int | None :
397+ def _home_loc_value (self , measurement : str ) -> float | int | None :
400398 """Helper-function for smile.py: _get_entity_data().
401399
402- Obtain the value/state for the given object from a location in DOMAIN_OBJECTS
400+ Obtain the value/state for the given measurement from the Home location
403401 """
404402 val : float | int | None = None
405403 search = self ._domain_objects
406- locator = f' ./location[@id=" { obj_id } " ]/logs/point_log[type=" { measurement } " ]/period/measurement'
404+ locator = f" ./location[@id=' { self . _home_loc_id } ' ]/logs/point_log[type=' { measurement } ' ]/period/measurement"
407405 if (found := search .find (locator )) is not None :
408406 val = format_measure (found .text , NONE )
409407 return val
0 commit comments