Use new SensorStateClass enum in flunearyou (#61441)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/61450/head
epenet 2021-12-10 14:55:33 +01:00 committed by GitHub
parent 25838e97e0
commit 0d9d6d5727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -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,
),
)