Use enums in openverse (#62082)
This commit is contained in:
parent
6acf45566e
commit
521458d981
1 changed files with 4 additions and 4 deletions
|
@ -9,13 +9,13 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
SensorDeviceClass,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
CONF_MONITORED_VARIABLES,
|
CONF_MONITORED_VARIABLES,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
|
||||||
ENERGY_KILO_WATT_HOUR,
|
ENERGY_KILO_WATT_HOUR,
|
||||||
TEMP_CELSIUS,
|
TEMP_CELSIUS,
|
||||||
TIME_MINUTES,
|
TIME_MINUTES,
|
||||||
|
@ -38,19 +38,19 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||||
key="ambient_temp",
|
key="ambient_temp",
|
||||||
name="Ambient Temperature",
|
name="Ambient Temperature",
|
||||||
native_unit_of_measurement=TEMP_CELSIUS,
|
native_unit_of_measurement=TEMP_CELSIUS,
|
||||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="ir_temp",
|
key="ir_temp",
|
||||||
name="IR Temperature",
|
name="IR Temperature",
|
||||||
native_unit_of_measurement=TEMP_CELSIUS,
|
native_unit_of_measurement=TEMP_CELSIUS,
|
||||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="rtc_temp",
|
key="rtc_temp",
|
||||||
name="RTC Temperature",
|
name="RTC Temperature",
|
||||||
native_unit_of_measurement=TEMP_CELSIUS,
|
native_unit_of_measurement=TEMP_CELSIUS,
|
||||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="usage_session",
|
key="usage_session",
|
||||||
|
|
Loading…
Add table
Reference in a new issue