birdie1 / victron

Victron bluetooth and serial communication at a python script. With MQTT and HomeAssistant support.
GNU General Public License v3.0
125 stars 16 forks source link

[FR] Add expire_after option for hass sensors #22

Closed robwolff3 closed 1 year ago

robwolff3 commented 1 year ago

Sometimes my smartshunt connected by usb disconnects and values remain static in homeassistant. It would be nice to have a expire_after option so its very obvious the values are old and not updating.

https://www.home-assistant.io/integrations/sensor.mqtt/#expire_after

birdie1 commented 1 year ago

Yeah, that sounds reasonable. I was not aware this option exists in hass. I will add it.

birdie1 commented 1 year ago

I have added expire_after option to "Latest" and "Battery" sensors. Commit https://github.com/birdie1/victron/commit/e59630cd705235ec1f69527464cb78a52cab26e9