You don’t need the for at all in your trigger since you aren’t using it.
There are a few ways to get the light to turn back off after 2 minutes.
The easiest, is to simply add a delay after the light is turned on (I think it is called “wait for time to pass” now in the list of things you can select for an action). And set it to 2 minutes. The automation will then pause at that point for 2 minutes. Then after the delay you add a call service to turn the light off again.
If you change the mode of the automation from “single” to “restart”, then every time the automation is triggered by motion being detected, it will stop the previous copy of the automation from running - cancelling the 2 minute delay, and start a new 2 minute delay. That way the light will only turn off after 2 minutes of no motion being detected.
- id: '1637523993802'
alias: Turn On Rear Garden Security Light when Motion is Detected (Home)
description: ''
trigger:
- platform: state
entity_id: binary_sensor.hue_outdoor_motion_sensor_1_motion
condition:
- condition: state
entity_id: sensor.hub_mode
state: Home
- type: is_illuminance
condition: device
device_id: f55ee4aa6c897bd26753bed686c2059b
entity_id: sensor.hue_outdoor_motion_sensor_1_light_level_2
domain: sensor
below: 20
action:
- service: light.turn_on
target:
device_id: 355588737af8c3aa202dc270655e88cb
data:
kelvin: 2700
brightness_pct: 75
- delay: "00:02:00"
- service: light.turn_off
target:
device_id: 355588737af8c3aa202dc270655e88cb
mode: restart
Something like that.