Hi, I have a little problem. I have an automation in relation to turning on (and off) a light depending on motion. The problem is that although the automation is working, it does not turn off the lights off, if its triggered by one of the two conditions. If the trigger condition is after sunset/below sunrise - it works fine. Turns on the light and turns off after one minute. But if the trigger condition is the lux value - it does turn on the light, but does not turn it off after a minut. No idea why. Help is appreciated!
alias: “[WIATROLAP][MOTION] wlacza i wylacza swiatlo na 1m”
description: “”
trigger:
Check the automation’s trace when that happens. What you might find is that when it is triggered by the second trigger, the illuminance is greater than 15 and so it doesn’t pass the condition where it must be less than 15 (and so it doesn’t turn off the light).
Is the light visible to the illuminance sensor?
In addition, I agree with francisp, please format the YAML to make it easier to read and check for syntax errors.
Sorry, new at this. i hope the way i pasted it is fine.
well, you are right. that might be a reason. the light is not directly visible, but well, it is slightly overall. is there a way around it in the parameters of the automation? i
Formatting still not right, I’m afraid. It ought to look something like:
trigger:
- platform: state
entity_id:
- binary_sensor.satel_cz_wejscie
to: "on"
- platform: state
entity_id:
- binary_sensor.satel_cz_wejscie
to: "off"
for:
hours: 0
minutes: 1
seconds: 0
etc. etc.