mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 22:55:10 +02:00
Enable Optional Indoor Humidity sensor for Lyric (#81420)
This commit is contained in:
@@ -90,6 +90,22 @@ async def async_setup_entry(
|
|||||||
device,
|
device,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
if device.indoorHumidity:
|
||||||
|
entities.append(
|
||||||
|
LyricSensor(
|
||||||
|
coordinator,
|
||||||
|
LyricSensorEntityDescription(
|
||||||
|
key=f"{device.macID}_indoor_humidity",
|
||||||
|
name="Indoor Humidity",
|
||||||
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
value=lambda device: device.indoorHumidity,
|
||||||
|
),
|
||||||
|
location,
|
||||||
|
device,
|
||||||
|
)
|
||||||
|
)
|
||||||
if device.outdoorTemperature:
|
if device.outdoorTemperature:
|
||||||
entities.append(
|
entities.append(
|
||||||
LyricSensor(
|
LyricSensor(
|
||||||
|
Reference in New Issue
Block a user