Use new enums in wled (#62431)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/62440/head
epenet 2021-12-20 20:57:05 +01:00 committed by GitHub
parent 2f8e44641b
commit 666e14b11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -8,10 +8,10 @@ from datetime import datetime, timedelta
from wled import Device as WLEDDevice
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -51,7 +51,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = (
name="Estimated Current",
native_unit_of_measurement=ELECTRIC_CURRENT_MILLIAMPERE,
device_class=SensorDeviceClass.CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda device: device.info.leds.power,
),
@ -82,7 +82,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = (
name="Free Memory",
icon="mdi:memory",
native_unit_of_measurement=DATA_BYTES,
state_class=STATE_CLASS_MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
value_fn=lambda device: device.info.free_heap,