Getting My head around Automation

One of my First automation

notify me when a Door was OPEN / CLOSED
mark 1 version done in editor and manually

- action:
  - data_template:
      message: ' {{ trigger.to_state.attributes.friendly_name }} was {{ trigger.to_state.state
        }} '
    service: notify.stephan_phone
  alias: To Stephan Phone
  condition: []
  id: '1513489971216'
  trigger:
  - entity_id: sensor.garage_side_door
    from: Closed
    platform: state
    to: Open
  - entity_id: sensor.garage_side_door
    from: Open
    platform: state
    to: Closed
  - entity_id: sensor.garage_door
    from: Open
    platform: state
    to: Closed
  - entity_id: sensor.garage_door
    from: Closed
    platform: state
    to: Open

Change my those Sensor to binary_sensor so I’m dealing with just ON/OFF
so Had to rewrite the Automation

and wrote it by hand

- id: 'notify stephan phone Door Change'
  alias: "notify Stephan phone Door Change"
  trigger:
  - entity_id: 
    - binary_sensor.garage_side_door
    - binary_sensor.garage_door
    - binary_sensor.front_door
    platform: state
  action:
  - data_template:
      title: "Home Assistant"
      message: "{{ trigger.to_state.attributes.friendly_name }} was {% if trigger.to_state.state == 'on' %} Open {% else %} Closed {% endif %}"
    service: notify.stephan_phone

much easyer to read
think the light has come on

hope this help someone else