Can't get automation to trigger notification

Hi,
I have following where i am trying to send a notification to my phone, i have home assistant app installed, enabled push notifications, i have tested the push notifications from HA by using the services and i see the push notification work on the phone so my guess is that the automation does not work, i am specifically trying the “Send notification on motion detect”. I can see in the Events that the binary sensor does indeed switch from off -> on but still no notification, what am i doing wrong ?

automation:
- alias: Send notification on open of door
  trigger:
    platform: state
    entity_id: lock.hoveddr
    to: 'unlocked'
  action:
    service: notify.ios_johns_iphone
    data:
        message: "Door unlocked !"          
- alias: Send notification on motion detect
  trigger:
    platform: state
    entity_id: binary_sensor.indkrsel_motion_2
    to: 'on'
  action:
    service: notify.ios_johns_iphone
    data:
        message: "Motion !"

/donnib

my guess would be a YAML syntax error, I think you indented too much the message: "..."

Try

automation:
- alias: Send notification on open of door
  trigger:
    platform: state
    entity_id: lock.hoveddr
    to: 'unlocked'
  action:
    service: notify.ios_johns_iphone
    data:
      message: "Door unlocked !"          
- alias: Send notification on motion detect
  trigger:
    platform: state
    entity_id: binary_sensor.indkrsel_motion_2
    to: 'on'
  action:
    service: notify.ios_johns_iphone
    data:
      message: "Motion !"

thx i tried to reduce it to two spaces and no changes so far :frowning:

also the YAMLint says everything is ok hmm…

This is my sample that works. Saved in separate yaml file reneeisthuis.yaml:

id: renee_is_thuis
alias: 'Renee is thuis'
trigger:
-  platform: state
   entity_id: device_tracker.iphonesvanrenee
   from: 'not_home'
   to: 'home'
action:
  service: notify.pushover
  data:
    message: "Renee is weer thuis!"

Maybe quotes around alias name?
Or missing ID: parameter.

I have an automation.yaml file:

- !include reneeisthuis.yaml
- !include jochemisthuis.yaml
- !include conradisthuis.yaml

And this line in configuration.yaml

automation: !include automation.yaml

I did not catch that. But yeah, that may be the problem.
For the “id” field, I do not think so, as I have never used it in any of my automations and they all work very well.

There where some changes since 0.45 or so.
Just updated my message.