Rest command automation not working [Solved]

Anyone see anything wrong with this as it’s not working?

  - alias: 'Send API envent to SS to trigger Nth Pathway camera for 10s'
    hide_entity: true
    trigger:
      - platform: state
        entity_id: binary_sensor.door_window_sensor_158d0001e4528a ## Test PIR in old Cat Door ##
        to: 'on'
    action:
      - service: rest_command.trigger_pathway_10s

I’ve confirmed calling the service from the dev panel and that works and checked the sensor when you walk past it and it changes to ‘on’.

End of a busy day so just not seeing it :roll_eyes:

[Solved] My Xaiomi sensor is stuck on! That’ll do it!