My Shelly Ecowitt WS90 is integrated with ZHA. Sometimes the precipitation sensor, which is cumulative, drops to zero and then back to its last value. Therefore all my additional utility meters for rain (month, day, hourly) have a wrong increase of rain, due to this. I think this can happen when HA restarts, but not always.
Also the gust speed sensor shows a huge spike above 25.000 km/h at the same time.
Does anyone have similar issues, as well?
Might this be a problem of the ZHA integration?
Any idea how this can be solved?
Thanks in advance for your help!
(As a new user it seems I cannot embed pics. Sorry!)
You get this crazy numbers…after HA restarts right?
If yes…
Use a template sensor that ignores impossible values.
template:
- sensor:
- name: "WS90 Rain Safe"
unit_of_measurement: "mm"
state: >
{% set new = states('sensor.ws90_rain')|float(0) %}
{% set old = states('sensor.ws90_rain_safe')|float(0) %}
{% if new == 0 and old > 0 %}
{{ old }}
{% else %}
{{ new }}
{% endif %}
Use this sensor for Utility Meter.
Filter gust spikes (200 km/h or whatever realistic max you choose).
template:
- sensor:
- name: "WS90 Gust Safe"
unit_of_measurement: "km/h"
state: >
{% set v = states('sensor.ws90_gust')|float(0) %}
{% if v > 200 %}
{{ states('sensor.ws90_gust_safe') }}
{% else %}
{{ v }}
{% endif %}