Hi!
I try to create an automation which should send a notification if there is a motion detected and it is in the time between one hour before sunset till one hour after sunrise.
For example:
sunrise: 06:00
sunset: 18:00
So the condition should work from 17:00 till 07:00
This is what I try, but there is something wrong with the sun condition- the Action will never be triggered. What do I wrong?
- id: 'xxxx'
alias: A1_Sonne ist unten
description: ''
trigger:
- device_id: xxxx
domain: binary_sensor
entity_id: binary_sensor.presence_5
platform: device
type: motion
condition:
- condition: or
conditions:
- after: sunset
after_offset: 01:00:00
before: sunrise
before_offset: 01:00:00
condition: sun
action:
...
Thank you