mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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 (
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
STATE_CLASS_TOTAL_INCREASING,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
@ -143,6 +144,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
||||
netatmo_name="Rain",
|
||||
entity_registry_enabled_default=True,
|
||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
icon="mdi:weather-rainy",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
@ -151,6 +153,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
||||
netatmo_name="sum_rain_1",
|
||||
entity_registry_enabled_default=False,
|
||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
icon="mdi:weather-rainy",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
@ -159,6 +162,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
||||
netatmo_name="sum_rain_24",
|
||||
entity_registry_enabled_default=True,
|
||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
icon="mdi:weather-rainy",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
|
Loading…
x
Reference in New Issue
Block a user