Add state_class to tomorrowio UV Index (#98541)
* Added state_class to UV Index Forgot to add a state_class as other sensors got their state_class from their device class. As there is no UV Index device class I left it out. * Forgotten a comma, whoops * Changed measurement to string. * Changed from "measurement" to SensorStateClass
This commit is contained in:
parent
8b4937f627
commit
1954539e65
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ from homeassistant.components.sensor import (
|
|||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
|
@ -295,6 +296,7 @@ SENSOR_TYPES = (
|
|||
TomorrowioSensorEntityDescription(
|
||||
key=TMRW_ATTR_UV_INDEX,
|
||||
name="UV Index",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:sun-wireless",
|
||||
),
|
||||
TomorrowioSensorEntityDescription(
|
||||
|
|
Loading…
Add table
Reference in a new issue