Alarm notification help please

Hey all,
playing around with the alarm control panel in LL, running HA 0.94.3

Goal: when any door opens (each door has a Samsung smarthings multi sensor attached) fire a notification with the door name and time

im going wrong and cant work out next steps! sorry

  • alias: ‘Send notification when alarm triggered’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.home_alarm
      to: ‘triggered’
      action:
    • service: notify.notify
      data:
      message: "ALARM! The alarm has been triggered by {{ automation.trigger_alarm_while_armed_away }} at {{ states(‘sensor.date__time’) }} "
  • alias: ‘Trigger alarm while armed away’
    trigger:
    • platform: state
      entity_id: binary_sensor.office_door_sensor_contact
      to: ‘on’
    • platform: state
      entity_id: binary_sensor.kitchen_door_sensor_contact
      to: ‘on’
      condition:
    • condition: state
      entity_id: alarm_control_panel.home_alarm
      state: armed_away
      action:
      service: alarm_control_panel.alarm_trigger
      entity_id: alarm_control_panel.home_alarm

It’s hard to help when your yaml isn’t formatted correctly to check spacing.

Sorry, whats the best way to paste it in?
is this better?

- alias: 'Send notification when alarm triggered'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.home_alarm
      to: 'triggered'
  action:
    - service: notify.notify
      data:
        message: "ALARM! The alarm has been triggered at {{ states('sensor.date_time') }} "

- alias: 'Trigger alarm while armed away'
  trigger:
    - platform: state
      entity_id: binary_sensor.office_door_sensor_contact
      to: 'on'
  condition:
    - condition: state
      entity_id: alarm_control_panel.home_alarm
      state: armed_away
  action:
    service: alarm_control_panel.alarm_trigger
    entity_id: alarm_control_panel.home_alarm
1 Like