Use new SensorStateClass enum in flunearyou (#61441)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/61450/head
parent
25838e97e0
commit
0d9d6d5727
|
@ -5,9 +5,9 @@ from collections.abc import Mapping
|
|||
from typing import Any, Union, cast
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_STATE, CONF_LATITUDE, CONF_LONGITUDE
|
||||
|
@ -58,49 +58,49 @@ USER_SENSOR_DESCRIPTIONS = (
|
|||
name="Avian Flu Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_DENGUE,
|
||||
name="Dengue Fever Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_FLU,
|
||||
name="Flu Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_LEPTO,
|
||||
name="Leptospirosis Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_NO_SYMPTOMS,
|
||||
name="No Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_SYMPTOMS,
|
||||
name="Flu-like Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_USER_TOTAL,
|
||||
name="Total Symptoms",
|
||||
icon="mdi:alert",
|
||||
native_unit_of_measurement="reports",
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue