mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Set measurement entity_class for darksky temp & humidity (#59512)
This commit is contained in:
parent
85aeee7cc7
commit
305d25b510
@ -13,6 +13,7 @@ import voluptuous as vol
|
||||
from homeassistant.components.sensor import (
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
PLATFORM_SCHEMA,
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
@ -181,6 +182,7 @@ SENSOR_TYPES: dict[str, DarkskySensorEntityDescription] = {
|
||||
key="temperature",
|
||||
name="Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
si_unit=TEMP_CELSIUS,
|
||||
us_unit=TEMP_FAHRENHEIT,
|
||||
ca_unit=TEMP_CELSIUS,
|
||||
@ -192,6 +194,7 @@ SENSOR_TYPES: dict[str, DarkskySensorEntityDescription] = {
|
||||
key="apparent_temperature",
|
||||
name="Apparent Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
si_unit=TEMP_CELSIUS,
|
||||
us_unit=TEMP_FAHRENHEIT,
|
||||
ca_unit=TEMP_CELSIUS,
|
||||
@ -203,6 +206,7 @@ SENSOR_TYPES: dict[str, DarkskySensorEntityDescription] = {
|
||||
key="dew_point",
|
||||
name="Dew Point",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
si_unit=TEMP_CELSIUS,
|
||||
us_unit=TEMP_FAHRENHEIT,
|
||||
ca_unit=TEMP_CELSIUS,
|
||||
@ -258,6 +262,7 @@ SENSOR_TYPES: dict[str, DarkskySensorEntityDescription] = {
|
||||
key="humidity",
|
||||
name="Humidity",
|
||||
device_class=DEVICE_CLASS_HUMIDITY,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
si_unit=PERCENTAGE,
|
||||
us_unit=PERCENTAGE,
|
||||
ca_unit=PERCENTAGE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user