arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
466 stars 104 forks source link

Battery level is lost when device goes offline #619

Open wifwucite opened 1 year ago

wifwucite commented 1 year ago

This is enhancement request. And I really like this plugin. It is the backbone for most of my devices. There is a small improvement: I have several devices that work on battery and that I switch off regularly. (I have configured a last will message that indicates the offline status.) Now when that happens the battery level of the device becomes zero. And then the Eve App reminds me to change the battery, which somewhat hides the real issues. So my proposal is to keep the last known battery level when a device goes offline. (Or maybe for backward compatibility offer an option to distinguish between the old set-to-zero and keeping the last level.) That would be really useful for me. Thanks a lot!