I am very helpless to get a very simple automation running by configuring it just by clicking.
There is a PIR (motion sensor) installed and the light has to be turned on from sunset to sunrise with a little offset time.
I combined the sunset and sunrise condition with an OR.
First condition “sunset”, second condition “OR” with nested sunrise.
This is the created YAML:
alias: Nachts Küchenlicht an
description: ''
trigger:
- type: motion
platform: device
device_id: 71d03128e2337c0e9f7f4ca0a4eda047
entity_id: binary_sensor.pir_kueche_occupancy
domain: binary_sensor
condition:
- condition: sun
after: sunset
after_offset: '-00:30:00'
- condition: or
conditions:
- condition: sun
before: sunrise
enabled: true
action:
- type: turn_on
device_id: 01358ce094d47f3ef55aba5004e96228
entity_id: switch.kuechenlicht
domain: switch
mode: single
1 post - 1 participant