mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Correct state class of ecowitt hourly rain rate sensors (#110475)
* Update sensor.py for Hourly Rain Rates mm and in hourly_rain_rate from integration ecowitt has state class total_increasing, but its state is not strictly increasing * Update sensor.py format
This commit is contained in:
parent
cc99a9b62a
commit
189c07d502
@ -241,7 +241,12 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Hourly rain doesn't reset to fixed hours, it must be measurement state classes
|
# Hourly rain doesn't reset to fixed hours, it must be measurement state classes
|
||||||
if sensor.key in ("hrain_piezomm", "hrain_piezo"):
|
if sensor.key in (
|
||||||
|
"hrain_piezomm",
|
||||||
|
"hrain_piezo",
|
||||||
|
"hourlyrainmm",
|
||||||
|
"hourlyrainin",
|
||||||
|
):
|
||||||
description = dataclasses.replace(
|
description = dataclasses.replace(
|
||||||
description,
|
description,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user