Always an error on automations.yaml

Hi all,
I’m just new in Home assistant, but I managed to make it work :smiley:
My only issue is that I am trying to config my alarm panel (Konnected) in automations.yaml I follow the manual but still having a error : " Invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None extra keys not allowed @ data[‘action’][0][‘message’]. Got None. (See /config/configuration.yaml, line 12)."

- alias: 'Trigger alarm while armed away'
  trigger:
    - platform: state
      entity_id: binary_sensor.fenetres_s_sol
      to: "open"
    - platform: state
      entity_id: binary_sensor.porte_patio
      to: "open"
    - platform: state
      entity_id: binary_sensor.portes_garage
      to: "open"
  condition:
    - condition: state
      entity_id: alarm_control_panel.home_alarm
      state: armed_away
  action:
    service: alarm_control_panel.alarm_trigger
    target:
      entity_id: alarm_control_panel.home_alarm
- 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"

I spend two hours testing all I was able to found on the community but still stuck if you have few minutes to spare to help it will be very appreciated
Thanks

I did not test the code, but the last bit has to be:

  action:
    - service: notify.notify
      data:
        message: "ALARM! The alarm has been triggered"

It works!!! it was just the ‘spaces’ :flushed:
@M1ke many many thanks, I will be more careful from now

You are also going to have issues with the triggers.

Binary sensors never have a state of “open”. They are always either “on” or “off”.

Thanks, and yes I changed it to ON already

'on' not ON. Look in Developer Tools / States to see the actual state.