alias: Schakeling - Verlichting aan bij duister
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.schuurtje_weerstation_bh1750_illuminance
below: '250'
for: '00:05:00'
condition:
- condition: time
after: '9:00'
before: '19:00'
- condition: or
conditions:
- condition: state
entity_id: person.x
state: home
- condition: state
entity_id: person.y
state: home
action:
- service: notify.telegram
data:
message: Schakeling - Verlichting aan bij duister
- type: turn_on
device_id: xxx
entity_id: switch.woonkamer_voorraam_links
domain: switch
- type: turn_on
device_id: xxx
entity_id: switch.woonkamer_voorraam_rechts
domain: switch
- type: turn_on
device_id: xxx
entity_id: switch.woonkamer_dressoir_links
domain: switch
- type: turn_on
device_id: xxx
entity_id: switch.woonkamer_dressoir_rechts
domain: switch
mode: single
The general idea is that when the sensor reports less than 250 lux between 9:00 and 19:00 and person.x or person.y is at home it will turn on the light.
This is my automation at the moment, seems to work for now.
Somehow I have to use the /5 minute trigger, because triggering it at lux doesn’t work (good).