Add Toon Humidity Sensor (#59488)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
tizzen33 2021-11-14 16:59:09 +01:00 committed by GitHub
parent ee07e9b379
commit 8b676f4252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_GAS,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_TEMPERATURE,
ENERGY_KILO_WATT_HOUR,
@ -141,6 +142,17 @@ SENSOR_ENTITIES: tuple[ToonSensorEntityDescription, ...] = (
state_class=STATE_CLASS_MEASUREMENT,
cls=ToonDisplayDeviceSensor,
),
ToonSensorEntityDescription(
key="current_humidity",
name="Humidity",
section="thermostat",
measurement="current_humidity",
native_unit_of_measurement=PERCENTAGE,
device_class=DEVICE_CLASS_HUMIDITY,
entity_registry_enabled_default=False,
state_class=STATE_CLASS_MEASUREMENT,
cls=ToonDisplayDeviceSensor,
),
ToonSensorEntityDescription(
key="gas_average",
name="Average Gas Usage",