psmqtt
psmqtt copied to clipboard
An HomeAssistant restart should trigger the re-publish of all tasks outputs
Just noticed that in the scenario where HA is restarted, what happens is that:
- psmqtt will notice that and will re-publish immediately the MQTT discovery messages
- psmqtt will NOT execute again all tasks though
- HomeAssistant MQTT integration will maintain in place all sensors that existed prior the restart but will flag all of them as "unavailable" till psmqtt sends some data on them.
The solution for this would be to either set the psmqtt flag mqtt.retain to true, but this has the downside that the entities will be forever available in HA, even if psmqtt stops working for whatever reason.
Another solution would be to implement a re-publish immediately of all sensor values. THis ticket keeps track of the latter option implementaiton