Problem with Garage automation

Hi,

Both automatons below work correctly only when the other is disabled. If the close door notification is on the open door notification doesn’t work.

Any ideas?

- id: '1536982795486'
  alias: Garage Notification
  trigger:
    platform: state                    
    entity_id: binary_sensor.garage_door
    from: 'off'
    to: 'on' 
  action:
    service: notify.telenotif
    data:
      message: 'Garage door is open.'
      
      
- id: '1536982795484'
  alias: Garage Notification
  trigger:
    platform: state                    
    entity_id: binary_sensor.garage_door
    from: 'on'
    to: 'off' 
  action:
    service: notify.telenotif
    data:
      message: 'Garage door is closed.'

Try removing the from: sections in the triggers. You really only need the to: part

1 Like

Just worked it out when looking at it here . the alias names are the same.!!!

Changed them and now it works.

You can condense this into one automation:

- id: '1536982795486'
  alias: Garage Notification
  trigger:
    platform: state                    
    entity_id: binary_sensor.garage_door
  action:
    service: notify.telenotif
    data:
      message_template: >
          {% if trigger.to_state == "On" %}
            Garage door is open
          {% else %}
            Garage door is closed
          {% endif %}
2 Likes

Perfect Thanks!