From 92e608ce049d2602a6a9861808190eaff7958c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hjelseth=20H=C3=B8yer?= Date: Wed, 1 Dec 2021 13:57:54 +0100 Subject: [PATCH] Use state class enum in Airthings (#60728) --- homeassistant/components/airthings/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/airthings/sensor.py b/homeassistant/components/airthings/sensor.py index db9b688d6a4..7f3d3693a4b 100644 --- a/homeassistant/components/airthings/sensor.py +++ b/homeassistant/components/airthings/sensor.py @@ -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,