Tag eafm sensors are measurement to collect long term stats (#80312)

This commit is contained in:
Jean-François Paris 2022-10-14 13:53:48 +01:00 committed by GitHub
parent 70702f3377
commit 3840cbd012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import logging
from aioeafm import get_station
import async_timeout
from homeassistant.components.sensor import SensorEntity
from homeassistant.components.sensor import SensorEntity, SensorStateClass
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_METERS
from homeassistant.core import HomeAssistant
@ -91,6 +91,7 @@ class Measurement(CoordinatorEntity, SensorEntity):
"""A gauge at a flood monitoring station."""
attribution = "This uses Environment Agency flood and river level data from the real-time data API"
_attr_state_class = SensorStateClass.MEASUREMENT
def __init__(self, coordinator, key):
"""Initialise the gauge with a data instance and station."""