mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 22:55:10 +02:00
Use SensorStateClass in iqvia (#61823)
This commit is contained in:
@@ -7,9 +7,9 @@ from typing import NamedTuple
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
STATE_CLASS_MEASUREMENT,
|
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
|
SensorStateClass,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_STATE
|
from homeassistant.const import ATTR_STATE
|
||||||
@@ -99,7 +99,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
|
|||||||
key=TYPE_ALLERGY_TODAY,
|
key=TYPE_ALLERGY_TODAY,
|
||||||
name="Allergy Index: Today",
|
name="Allergy Index: Today",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ALLERGY_TOMORROW,
|
key=TYPE_ALLERGY_TOMORROW,
|
||||||
@@ -110,7 +110,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
|
|||||||
key=TYPE_ASTHMA_TODAY,
|
key=TYPE_ASTHMA_TODAY,
|
||||||
name="Asthma Index: Today",
|
name="Asthma Index: Today",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ASTHMA_TOMORROW,
|
key=TYPE_ASTHMA_TOMORROW,
|
||||||
@@ -121,7 +121,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
|
|||||||
key=TYPE_DISEASE_TODAY,
|
key=TYPE_DISEASE_TODAY,
|
||||||
name="Cold & Flu Index: Today",
|
name="Cold & Flu Index: Today",
|
||||||
icon="mdi:pill",
|
icon="mdi:pill",
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user