Notification to iPhone on motion

Hi, trying to send notifications to my mobile when motion is detected but it works only if I run the action manually…

This is what I have in my configuration yaml.

automation motion_basement:
  - alias: 'Basement Motion'
      platform: state
      entity_id: binary_sensor.ir_basement
      to: 'On'
      - service: notify.mobile_app_iphone
          title: "Basement Motion"
          message: "Motion Detected"

Try just „on“ as the to state. All in lowercase

thanks that worked!!