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 formatpull/116943/head^2
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
|
||||
if sensor.key in ("hrain_piezomm", "hrain_piezo"):
|
||||
if sensor.key in (
|
||||
"hrain_piezomm",
|
||||
"hrain_piezo",
|
||||
"hourlyrainmm",
|
||||
"hourlyrainin",
|
||||
):
|
||||
description = dataclasses.replace(
|
||||
description,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
|
|
Loading…
Reference in New Issue