Use state class enum in Airthings (#60728)

pull/60595/head
Daniel Hjelseth Høyer 2021-12-01 13:57:54 +01:00 committed by GitHub
parent ddc17cb001
commit 92e608ce04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -4,10 +4,10 @@ from __future__ import annotations
from airthings import AirthingsDevice
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
StateType,
)
from homeassistant.config_entries import ConfigEntry
@ -133,7 +133,7 @@ async def async_setup_entry(
class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
"""Representation of a Airthings Sensor device."""
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_state_class = SensorStateClass.MEASUREMENT
def __init__(
self,