mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Use state class enum in Airthings (#60728)
This commit is contained in:
parent
ddc17cb001
commit
92e608ce04
@ -4,10 +4,10 @@ from __future__ import annotations
|
|||||||
from airthings import AirthingsDevice
|
from airthings import AirthingsDevice
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
STATE_CLASS_MEASUREMENT,
|
|
||||||
SensorDeviceClass,
|
SensorDeviceClass,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
|
SensorStateClass,
|
||||||
StateType,
|
StateType,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -133,7 +133,7 @@ async def async_setup_entry(
|
|||||||
class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
|
class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
|
||||||
"""Representation of a Airthings Sensor device."""
|
"""Representation of a Airthings Sensor device."""
|
||||||
|
|
||||||
_attr_state_class = STATE_CLASS_MEASUREMENT
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user