Philips Hue Sensor

Hi,
I am trying to get a Philips Hue sensor to turn on a ‘switch’.

My automation.yaml looks like this however it doesn’t seem to work.

- id: '1540721538342'
  alias: New Automation
  trigger:
  - entity_id: sensor.downstairs_study_motion_sensor
    from: 'False'
    platform: state
    to: 'True'
  condition: []
  action:
  - data: {}
    entity_id: switch.outside_light
    service: switch.turn_on

I have a Hue motion sensor triggering a nightlight:

- alias: Night light on landing  #if motion is detected
  initial_state: on
  trigger:
    platform: state
    entity_id: sensor.motion_sensor_upstairs_landing
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.gateway_light
    data:
      brightness: 170
      rgb_color: [255,103,23]

You wouldn’t need the data block for a swtich.

You could try changing “True” to “On”. I don’t think it matters but you could also maybe use homeassistant.turn_on rather than switch.turn_on?

Thanks, the ‘on’ bit worked as per below. My next question is regarding the delay, is there a way to reset the countdown timer? Ie. The motion sensor is sensing movement every 30 seconds, therefore, the delay below gets reset.?

- id: '1540721538342'
  alias: New Automation
  trigger:
  - entity_id: sensor.downstairs_study_motion_sensor
    platform: state
    to: 'on'
  action:
  - data: {}
    entity_id: switch.outside_light
    service: switch.turn_on
  - delay: 00:01:00
  - entity_id: switch.outside_light
    service: switch.turn_off