mirror of
https://github.com/home-assistant/core.git
synced 2026-09-07 18:25:01 -05:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user