Skip to content

Commit ec25ead

Browse files
authored
Add outside temperature sensor to MELCloud Air-to-Air devices (#150722)
1 parent e8277cb commit ec25ead

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

homeassistant/components/melcloud/sensor.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ class MelcloudSensorEntityDescription(SensorEntityDescription):
4949
value_fn=lambda x: x.device.total_energy_consumed,
5050
enabled=lambda x: x.device.has_energy_consumed_meter,
5151
),
52+
MelcloudSensorEntityDescription(
53+
key="outside_temperature",
54+
translation_key="outside_temperature",
55+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
56+
device_class=SensorDeviceClass.TEMPERATURE,
57+
state_class=SensorStateClass.MEASUREMENT,
58+
value_fn=lambda x: x.device.outdoor_temperature,
59+
enabled=lambda x: x.device.has_outdoor_temperature,
60+
),
5261
)
5362
ATW_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
5463
MelcloudSensorEntityDescription(

0 commit comments

Comments
 (0)