We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a32853 commit 8fe79a8Copy full SHA for 8fe79a8
homeassistant/components/ecowitt/sensor.py
@@ -285,16 +285,14 @@ def _new_sensor(sensor: EcoWittSensor) -> None:
285
name=sensor.name,
286
)
287
288
- # Hourly rain doesn't reset to fixed hours, it must be measurement state classes
+ # Only total rain needs state class for long-term statistics
289
if sensor.key in (
290
- "hrain_piezomm",
291
- "hrain_piezo",
292
- "hourlyrainmm",
293
- "hourlyrainin",
+ "totalrainin",
+ "totalrainmm",
294
):
295
description = dataclasses.replace(
296
description,
297
- state_class=SensorStateClass.MEASUREMENT,
+ state_class=SensorStateClass.TOTAL_INCREASING,
298
299
300
async_add_entities([EcowittSensorEntity(sensor, description)])
0 commit comments