I am new with the Home Assistant, I slowly integrated my Hue System first, and now I have a problem with the following configuration and I hope you can help me.
on the garage we have a motion detection and two lamps, all from Philips Hue. I have make a config, that works after the sunset, and will stop after sunrise. After an motion ist detectetd, the two lamps going on, after 3 min lights down. After 20:30 (the actually sunset time) it really works fine, after 23:00 the log said
"- Triggered by the state of binary_sensor.garage_bewegungsmelder_motion at 27. August 2022 um 23:05:22
I think your Condition may be better to include ‘after’ and ‘before’ sunrise, like this:
condition: sun
after: sunset
before: sunrise
otherwise the automation will only work until midnight.
I’m guessing that the time shown in the trace may really be 00:30 so, after midnight. I may be wrong as I doubt the developers have made such an error.
Also, please put your yaml code in using the code insert tool. It’s not a big problem but neatly formatted code is easier to read.
According to the documentation for Sunrise/Sunset Condition, you cannot combine the after and before options in one condition.
Therefore, to cover time between sunset and sunrise one need to use after: sunset and before: sunrise as 2 separate conditions and combine them using or.
condition:
condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise