Mqtt configuration:
mqtt:
broker: ip
birth_message:
topic: 'service/irbridge1/service/connection'
payload: '1'
retain: True
will_message:
topic: 'service/irbridge1/service/connection'
payload: '0'
retain: True
I notices on restart or shutdown it does not update with the will_message, so i tried this:
- id: mqtt_on_exit
trigger:
platform: event
event_type: homeassistant_stop
action:
service: mqtt.publish
data:
topic: 'service/irbridge1/service/connection'
payload: '0'
retain: True
and this:
- id: mqtt_on_exit
trigger:
platform: homeassistant
event: shutdown
action:
service: mqtt.publish
data:
topic: 'service/irbridge1/service/connection'
payload: '0'
retain: True
This does not seem to work, either way.
Please point me in the right direction.
Thank you kindly