The door status is showing in my overview, and when I open and close the door it changes status…
Here is the entries from my automation.yaml file
mode: single
- id: '1615112667025'
alias: Studio Door Closed Alert
description: ''
trigger:
- platform: state
entity_id: binary_sensor.studio_door
from: 'On'
to: 'Off'
condition: []
action:
- service: mqtt.publish
data:
topic: HomeAssistant/Studio/Door/Status
payload: '1'
mode: single
- id: '1615113159409'
alias: Studio Door Open Alert
description: ''
trigger:
- platform: state
entity_id: binary_sensor.studio_door
to: 'On'
from: 'Off'
condition: []
action:
- service: mqtt.publish
data:
topic: HomeAssistant/Studio/Door/Status
payload: '0'
So… my issue… the automation never triggers?? I am not sure if I should be using the combination of Open/Closed or On/Off to trigger the sending of the MQTT message?
Yes, I have tried copious amounts of combinations of both and am not getting anywhere. Is there somewhere I can see what I should be using to trigger the automation? The logs are useless, unless I am missing something?
I just want to send an MQTT message when the door is opened, and another when it is closed. All help greatly appreciated.
Thanks for the info… So, if I understand… I would use on and off in the automation? What would I use as the trigger, would that be ‘state’ or something else?