I’ve been playing around and got the birth message working at least. Configuration:
- Hassio on Ubuntu
- Broker: Community Hass.io Add-on: MQTT Server & Web client
- MQTT HA client configured initially through Integrations in the UI
I added the following to configuration.yaml after the initial configuration of MQTT:
mqtt:
broker: 192.168.xxx.xxx:1883 # broker address a0d7b954-mqtt also works for the Hassio MQTT Server and Web client Add On
username: !secret mqtt_username
password: !secret mqtt_password
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
payload: 'offline'
As mentioned above, the birth message gets sent. The last will message does not.
Can someone try this with a different broker type (not the Hassio add-on) to see if the last will message works with a different broker in order to narrow down the failure conditions? Thanks