Sonoff Basic Automation (I'm Stuck)

I have my first sonoff basic flashed with tasmota and setup in mqtt.
I want an automation that will turn on/off the sonoff based on a motion sensor status.
The code below works in my house already with other types of devices but will not work with a sonoff.
The motion sensor is NOT wired to the sonoff.
What am I missing? Shown is the yaml and Tasmota pics.

- alias: Turn on garage light when there is movement
  trigger:
    platform: state
    entity_id: binary_sensor.garage_motion_sensor
    to: 'on'
  action:
    service: light.turn_on
    entity_id: 
      - switch.tasmota

- alias: Turn off garage light 10 minutes after last movement
  trigger:
    platform: state
    entity_id: binary_sensor.garage_motion_sensor
    to: 'off'
    # for:
    #   minutes: 5
  action:
    service: light.turn_off
    entity_id: 
      - switch.tasmota

What am I missing. Since this is my first tasmota sonoff basic is it anything in the tasmota configuration?
Thanks
carltonb

Your service call is ‘light.turn_on’ but the entity id is for a switch. change the service to ‘switch.turn_on’ and ‘switch.turn_off’ respectively

Thank you so much, for the life of me I did not notice the difference in commands.

carltonb

Been there done that myself :wink: