Hi all,
I have a Philips Hue Outdoor Motion Sensor in the garden. The garden lights are automated through some Z-Wave Smart Plugs.
My ambitions it to have the following automation. If
- the motion sensor detects motion, and
- the time is between sunset and sunrise, and
- the light is not yet on
then turn on the light for 20 seconds.
I seem to get most of the automation working, except for the 20 second time rule. Below the code I’ve used. Any help would be highly appreciated
alias: Test
description: ""
trigger:
- type: motion
platform: device
device_id: e571f625f4b2e2f2b2a559ca60bf928a
entity_id: binary_sensor.hue_outdoor_motion_sensor_1_motion
domain: binary_sensor
condition:
- condition: sun
after: sunset
- condition: device
type: is_on
device_id: a0d8b076a688dbfecf2f9c4cf79744e0
entity_id: light.stopcontact_lamp_spotjes
domain: light
action:
- service: light.turn_on
data: {}
target:
entity_id: light.stopcontact_lamp_spotjes
mode: single