From dff29639bdb8f80872fd4f37e3414113d6a02729 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:22:02 +0100 Subject: [PATCH] Use new SensorStateClass enum in co2signal (#61333) Co-authored-by: epenet --- homeassistant/components/co2signal/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/co2signal/sensor.py b/homeassistant/components/co2signal/sensor.py index 53a02afb560..6b176c2cf5f 100644 --- a/homeassistant/components/co2signal/sensor.py +++ b/homeassistant/components/co2signal/sensor.py @@ -10,8 +10,8 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components.sensor import ( PLATFORM_SCHEMA, - STATE_CLASS_MEASUREMENT, SensorEntity, + SensorStateClass, ) from homeassistant.const import ( ATTR_ATTRIBUTION, @@ -84,7 +84,7 @@ async def async_setup_entry(hass, entry, async_add_entities): class CO2Sensor(update_coordinator.CoordinatorEntity[CO2SignalResponse], SensorEntity): """Implementation of the CO2Signal sensor.""" - _attr_state_class = STATE_CLASS_MEASUREMENT + _attr_state_class = SensorStateClass.MEASUREMENT _attr_icon = "mdi:molecule-co2" def __init__(