mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Tag eafm sensors are measurement to collect long term stats (#80312)
This commit is contained in:
parent
70702f3377
commit
3840cbd012
@ -5,7 +5,7 @@ import logging
|
|||||||
from aioeafm import get_station
|
from aioeafm import get_station
|
||||||
import async_timeout
|
import async_timeout
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import SensorEntity, SensorStateClass
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_METERS
|
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_METERS
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -91,6 +91,7 @@ class Measurement(CoordinatorEntity, SensorEntity):
|
|||||||
"""A gauge at a flood monitoring station."""
|
"""A gauge at a flood monitoring station."""
|
||||||
|
|
||||||
attribution = "This uses Environment Agency flood and river level data from the real-time data API"
|
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):
|
def __init__(self, coordinator, key):
|
||||||
"""Initialise the gauge with a data instance and station."""
|
"""Initialise the gauge with a data instance and station."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user