From 189c07d502fe67e62d031dd6c4088ef259e2e351 Mon Sep 17 00:00:00 2001 From: Peter Antonvich Date: Wed, 8 May 2024 11:19:16 -0400 Subject: [PATCH] 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 --- homeassistant/components/ecowitt/sensor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ecowitt/sensor.py b/homeassistant/components/ecowitt/sensor.py index 5f2f08f2519..dccb3747c60 100644 --- a/homeassistant/components/ecowitt/sensor.py +++ b/homeassistant/components/ecowitt/sensor.py @@ -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,