Automation - trigger sensor photocell

I have a sensor command_line for my photocell

This is working.

sensor:
  platform: command_line
  command: /usr/local/bin/light_sensor.sh 10
  name: Light
  unit_of_measurement: "Light"

But i can’t get it right to use a trigger on it

automation:
- alias: Turn on light on brightness photocell
  trigger:
    platform: numeric_state
    entity_id: sensor.light
    above: 1000
  action:
    service: switch.turn_on
    entity_id: switch.bank