Use new SensorStateClass enum in co2signal (#61333)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/61338/head
epenet 2021-12-09 09:22:02 +01:00 committed by GitHub
parent fb7bab2a5d
commit dff29639bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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__(