Use SensorStateClass in hassio (#61720)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
782229ff44
commit
7adffe6927
1 changed files with 3 additions and 3 deletions
|
@ -2,9 +2,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import PERCENTAGE
|
||||
|
@ -42,7 +42,7 @@ ADDON_ENTITY_DESCRIPTIONS = COMMON_ENTITY_DESCRIPTIONS + (
|
|||
name="CPU Percent",
|
||||
icon="mdi:cpu-64-bit",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
|
@ -50,7 +50,7 @@ ADDON_ENTITY_DESCRIPTIONS = COMMON_ENTITY_DESCRIPTIONS + (
|
|||
name="Memory Percent",
|
||||
icon="mdi:memory",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue