muppet3000 / homeassistant-grott

Home Assistant Integration for Grott - MQTT
MIT License
76 stars 17 forks source link

A lot of sensors do not reset to 0 when inverter remains in sleep mode #88

Open jkkataja opened 6 months ago

jkkataja commented 6 months ago

Hi,

It seems that when the inverter remains in sleep/offline mode (happened here in Finland due to sudden snowfall) a lot of sensors do not reset to 0, but rather keep showing the last known value.

Examples of affected sensors: sensor._self_consumption_solar_battery_energy_today_pvenergytoday sensor._pv_all_energy_today_calculated sensor._pv2_energy_today sensor._pv1_voltage

Example screenshot with ID left out, last updated value "day before yesterday"

image image

Would it be possible to consider a workaround that if no updates for 1 hour then set sensor values to 0?

Cheers

1RandomDev commented 5 months ago

If you configure an MQTT sensor via the config there's the option expire_after that lets the sensor become unavailable if for example there was no message for 6-10min. Maybe something like that exists in the API too.