Automation not loading, but it activates the trigger

HI
My 1st automation for testing when the sensor is from off to on , to switch to on one light switch.
but it’s not doing nothing…
i don’t know why…
can someone help me please?

my yaml is
"

  • id: ‘1592327763973’
    alias: Teste WC
    description: Testar PIR
    trigger:
    • entity_id: binary_sensor.pir_hall
      from: ‘off’
      platform: state
      to: ‘on’
      condition: []
      action:
    • data: {}
      entity_id: switch.sonoff_1000bcb030_2
      service: switch.turn_on
      initial_state: true
      "

Please format your code properly. Read this :

Especially point 11