mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add long-term statistics support for rain sensors (#56847)
This commit is contained in:
parent
25b76964a5
commit
7560c7b3de
@ -9,6 +9,7 @@ import pyatmo
|
|||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
STATE_CLASS_MEASUREMENT,
|
STATE_CLASS_MEASUREMENT,
|
||||||
|
STATE_CLASS_TOTAL_INCREASING,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
)
|
)
|
||||||
@ -143,6 +144,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||||||
netatmo_name="Rain",
|
netatmo_name="Rain",
|
||||||
entity_registry_enabled_default=True,
|
entity_registry_enabled_default=True,
|
||||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||||
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
icon="mdi:weather-rainy",
|
icon="mdi:weather-rainy",
|
||||||
),
|
),
|
||||||
NetatmoSensorEntityDescription(
|
NetatmoSensorEntityDescription(
|
||||||
@ -151,6 +153,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||||||
netatmo_name="sum_rain_1",
|
netatmo_name="sum_rain_1",
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||||
|
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||||
icon="mdi:weather-rainy",
|
icon="mdi:weather-rainy",
|
||||||
),
|
),
|
||||||
NetatmoSensorEntityDescription(
|
NetatmoSensorEntityDescription(
|
||||||
@ -159,6 +162,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||||||
netatmo_name="sum_rain_24",
|
netatmo_name="sum_rain_24",
|
||||||
entity_registry_enabled_default=True,
|
entity_registry_enabled_default=True,
|
||||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||||
|
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||||
icon="mdi:weather-rainy",
|
icon="mdi:weather-rainy",
|
||||||
),
|
),
|
||||||
NetatmoSensorEntityDescription(
|
NetatmoSensorEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user