emontnemery / hatasmota

MIT License
24 stars 20 forks source link

Sensors with deep-sleep operations are mostly unavailable #263

Open fra-orolo opened 10 months ago

fra-orolo commented 10 months ago

Improvement-Request

I have a couple of Tasmota-based sensors that transmit values on MQTT every 5 minutes and are powered down otherwise. The current integration recognizes these and detects them for home assistant, but any sensor entity does only display the value for 5-10 seconds. As soon as the device writes the LWT to offline, everything shows only "unavailable".

From the MQTT-side the Tasmota behaviour is correct, LWT tells listeners that the device will not respond. In HA otherwise it should be clear that the sensor is functioning normally, only if it does not update for more than 2*deep_sleep_time it could be considered really unavailable.

This is not only a problem for me but has been discussed on some forums: The suggested workaround is, to configure a manual MQTT device and not use the Tasmota integration :-(

As the code in this project is generating the MQTT interactions and the status updates (available , unavailable) it should be addressed in this code.

Features: