Hi all,
I have been struggling with some light automations. The first one to turn lights on after lux level below 20, and after sunrise works fine.
alias: deCONZ light nattbelysning SH/TH on
description: Below 20 lx and after sunset
trigger:
- platform: numeric_state
entity_id: sensor.infart_motion_light_level
below: '20'
condition:
- condition: and
conditions:
- condition: sun
after: sunset
action:
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id: light.hallfonster
- service: light.turn_on
target:
entity_id: light.gardsfonster
data:
brightness_pct: 30
- service: light.turn_on
data:
brightness_pct: 50
rgb_color:
- 255
- 0
- 0
target:
entity_id: light.koksfonster
- service: light.turn_on
data:
brightness_pct: 30
target:
entity_id:
- light.th_nattbelysning
mode: single
But I can’t get it to work the opposite way, e.g. turn off the lights at sunset and above a certain lux level.
alias: deCONZ light nattbelysning SH/TH off
description: Sunrise and above 15 lx
trigger:
- platform: numeric_state
entity_id: sensor.infart_motion_light_level
above: '15'
condition:
- condition: and
conditions:
- condition: sun
after: sunrise
action:
- service: light.turn_off
target:
entity_id:
- light.nattbelysning
- light.th_nattbelysning
mode: single
Any suggestions highly appreciated!