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