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:
Dennis 2023-08-17 11:13:11 +02:00 committed by GitHub
parent 8b4937f627
commit 1954539e65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(