Sunrise-Sunset and Calendar functions for edge

@montyfert @andresg

I already found why it doesn’t work, although it seems unbelievable! And I don’t know if I can explain it.

This automation that has as a precondition an interval of days, expressed numerically.
And a condition that if the light turns on in that period then send notification

Removing the precondition to do a test shows the automation as when any of the conditions are met.
Then It were working as an OR condition.!!!

I have selected when all the conditions are met

and then I have put the interval of days as a precondition again.
Now it works like a precondition but AND

So I had done 5 routines for 5 periods and all of them were working as OR configurations without knowing it, since routine only showed one precondition and one condition.
All 5 routines executed when Turn On the light

Now only the routine corresponding to the correct interval is activated: 0916 (sep/16)

@montyfert

What is happening to you is that you have several OR conditions in your routines, for your risks switches and the precondition also behaves like a mad OR condition, instead of a precondition for the whole routine.

Please @andresg check this strange behavior

1 Like