Use SensorStateClass in iqvia (#61823)

pull/61831/head
epenet 2021-12-14 21:56:36 +01:00 committed by GitHub
parent 01c8e5f49d
commit b59f39b214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -7,9 +7,9 @@ from typing import NamedTuple
import numpy as np
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_STATE
@ -99,7 +99,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
key=TYPE_ALLERGY_TODAY,
name="Allergy Index: Today",
icon="mdi:flower",
state_class=STATE_CLASS_MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key=TYPE_ALLERGY_TOMORROW,
@ -110,7 +110,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
key=TYPE_ASTHMA_TODAY,
name="Asthma Index: Today",
icon="mdi:flower",
state_class=STATE_CLASS_MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key=TYPE_ASTHMA_TOMORROW,
@ -121,7 +121,7 @@ INDEX_SENSOR_DESCRIPTIONS = (
key=TYPE_DISEASE_TODAY,
name="Cold & Flu Index: Today",
icon="mdi:pill",
state_class=STATE_CLASS_MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT,
),
)