Hi there,
I can’t make this automation run at all.
It is a pretty simple setup, a Zigbee Thirdreality motion sensor night light plugged into an outlet (it goes from clear to detected), a dimmer light switch (Zigbee, I can turn it on and off from HA) that works perfectly as a standalone switch and it has worked fine in other versions of this automation. I am trying to combine two automations into one with a couple more options.
If anyone of you can look at this and knows why it can’t run that way, please let me know.
Thanks
It tells that it at least triggered and the time it triggered.
Also that none of the choices were valid condition wise so it stopped.
From there we need to look at the conditions and why they were false.
- condition: sun
after: sunset
after_offset: "-00.30"
- condition: time
before: "22:00:00"
This one is due to it not being after sunset.
- condition: time
after: "22:00:00"
- condition: sun
before: sunrise
before_offset: "00:30"
Same here, sunrise will already have happend at that time.
I always get confused when working with before, after with sun so someone else can maybe see it they overlap in a weird way.
But you will need to post a trace when it should work. Not a trace from when it should not work.
When you only define one of beforeorafter in a Sun condition, it does not cross midnight. So you need an Or condition because it will never be both after 22:00 and before sunrise on the same day. Also, technically, the offset should be negative to match the other one…
- conditions:
- or:
- condition: time
after: "22:00:00"
- condition: sun
before: sunrise
before_offset: "-00:30"
Third Issue
Your third option in the Choose will never execute. The trigger fires on motion, so the sensor will never meet the criteria of is_no_motion for 30 seconds. This should be a second trigger, not a condition.