mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Use new enums in ted5000 (#62425)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
@@ -9,8 +9,8 @@ import xmltodict
|
|||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
STATE_CLASS_MEASUREMENT,
|
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
|
SensorStateClass,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
@@ -62,7 +62,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
class Ted5000Sensor(SensorEntity):
|
class Ted5000Sensor(SensorEntity):
|
||||||
"""Implementation of a Ted5000 sensor."""
|
"""Implementation of a Ted5000 sensor."""
|
||||||
|
|
||||||
_attr_state_class = STATE_CLASS_MEASUREMENT
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
|
|
||||||
def __init__(self, gateway, name, mtu, unit):
|
def __init__(self, gateway, name, mtu, unit):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
|
Reference in New Issue
Block a user