@Andrew714 wrote:
Hey,
I would like to make a simple automation and keep the lights on as long there is a movement in the bathroom. Nevertheless the light turns off after 1 minute and then I need to wave and wait for around 30 seconds until the light turns on again.
I am using Raspberry Pi 3 + Deconz + Home Assistant in a docker container. For sensors I am using Ikea motion sensor & light bulb. My automation code is:- id: '1578393462491' alias: Turn the light on when motion is detected & it's dark description: '' trigger: - entity_id: binary_sensor.tradfri_motion_sensor platform: state to: 'on' action: - device_id: 8059b3a0a5ea4c42aa6134173d14aaca domain: light entity_id: light.ikea_dimmable_light_bad type: turn_on - id: '1579034320307' alias: Turn off the light in bathroom after 2 mins description: '' trigger: - entity_id: binary_sensor.tradfri_motion_sensor platform: state to: 'off' for: minutes: 1 action: - device_id: 8059b3a0a5ea4c42aa6134173d14aaca domain: light entity_id: light.ikea_dimmable_light_bad type: turn_off
Posts: 2
Participants: 2