Can the MQTT Event bus out states be set as retain?
I’m using the Event bus for populating an home assistant instance, mostly for the homekit integration. It works really well. But on restart of homeassistant (which is much more frequent the OH due to the way it works), it doesn’t retain states…and some items never push out a state update, ie a zwave switch that is turned on at the start of the day.
I couldn’t see anything in the event bus config that allowed for the setting of the retain flag. Or is there where MQTT Persistence should be used? But I got the impression that I had to set up a new mqtt topic path for the persistence.
I guess a third option is a command the forces all items to post an update?
Set the retain flag to true in mqtt.cfg. You can only set the retain flag for an entire broker. If you need some messages to be retained and some not retained you need to configure two broker configurations in mqtt.cfg, one with the retain flag set and one without. Then select the one with the flag set in the mqtt-eventbus.cfg.
Now THAT is a very good application
There are several users of HA and openHAB
Could you write up a tutorial on how you configured your system to do that.
I am sure that others will be interested.