Hello everyone,
I would like to ask for your advice on the following matter.
I have purchased a light-sensitive sensor so that I can switch on my living room lights when the light intensity in the room falls below a certain value. I have set up an automation for this purpose, which works as intended. However, here’s the issue: at 11:00 PM, the automation turns off all the lights because we start winding down for bed. Now, it turns out that the trigger measuring the minimum light intensity to turn the lights on keeps getting activated again. In other words, after I turn off the lights, they are turned back on 5 minutes later because the automation detects that the lux value in the living room is below a certain threshold. While the automation is logically functioning, it’s not what I want.
Do you have any ideas on how I can ensure that the lights remain off after 11:00 PM until it starts getting dark again the next day?
Thank you in advance for your input.
Herman F.
Below the code of the automation;
alias: Licht woonkamer schakelen op lichtsterkte
description: ""
trigger:
- type: illuminance
platform: device
device_id: 0c7e8186753e5a92f3d5c7e16b4cfca1
entity_id: 826c1a66b2af564b02ea0f62be76eae9
domain: sensor
below: 1000
for:
hours: 0
minutes: 5
seconds: 0
id: Lampen aan
- platform: time
at: "23:00:00"
id: Lampen uit
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Lampen aan
sequence:
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id:
- light.lampen_woonkamer_50
- service: light.turn_on
data:
brightness_pct: 30
target:
entity_id: light.lampen_woonkamer_30
- conditions:
- condition: trigger
id:
- Lampen uit
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.lampen_woonkamer_50
- light.lampen_woonkamer_30
mode: single