File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -329,16 +329,6 @@ def _get_device_data(self, dev_id: str) -> DeviceData:
329329 """
330330 device = self .gw_devices [dev_id ]
331331 device_data = self ._get_measurement_data (dev_id )
332- # Generic
333- if self .smile_type == "thermostat" and device ["dev_class" ] == "gateway" :
334- # Adam & Anna: the Smile outdoor_temperature is present in DOMAIN_OBJECTS and LOCATIONS - under Home
335- # The outdoor_temperature present in APPLIANCES is a local sensor connected to the active device
336- outdoor_temperature = self ._object_value (
337- self ._home_location , "outdoor_temperature"
338- )
339- if outdoor_temperature is not None :
340- device_data ["sensors" ]["outdoor_temperature" ] = outdoor_temperature
341- self ._count += 1
342332
343333 # Check availability of non-legacy wired-connected devices
344334 if not self ._smile_legacy :
Original file line number Diff line number Diff line change @@ -1039,6 +1039,16 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
10391039 if dev_id == self .gateway_id and self .smile (ADAM ):
10401040 self ._get_regulation_mode (appliance , data )
10411041
1042+ # Adam & Anna: the Smile outdoor_temperature is present in DOMAIN_OBJECTS and LOCATIONS - under Home
1043+ # The outdoor_temperature present in APPLIANCES is a local sensor connected to the active device
1044+ if self ._is_thermostat and dev_id == self .gateway_id :
1045+ outdoor_temperature = self ._object_value (
1046+ self ._home_location , "outdoor_temperature"
1047+ )
1048+ if outdoor_temperature is not None :
1049+ data .update ({"sensors" : {"outdoor_temperature" : outdoor_temperature }})
1050+ self ._count += 1
1051+
10421052 if "c_heating_state" in data :
10431053 self ._process_c_heating_state (data )
10441054 # Remove c_heating_state after processing
You can’t perform that action at this time.
0 commit comments