I have an Ikea Vallhorn light sensor. I use the lux value of this to trigger an automation that triggers my indoor lightning. Currently I have it set to run when lux is below 70 for 10 minutes.
Living in sweden though, it is working most of the time by running when the sun goes down. But on very cloudy and rainy days it might even trigger at 13:00 during the day which is my opinion is to early.
What are my options to only allow this automation to run like, lets say after 14:00? I could use an and condition of course…but that might also mean that it will not trigger at all during the day. Besides, that time will have to change during summer…
Sun elevation? That’s probably the closest to what you want, only letting it turn on when the sun is below (say) 3 degrees, or -3 degrees - some value that works for you.
There’s even a (disabled by default) entity for that in the sun integration.
This is what I used before I got the lux sensor. The problem with that is that lights turned on to late when it was cloudy etc.
So Id want some solution in between I guess…
Like enabling/disabling the current automation based on some time or sun elevation perhaps? Is that possible? I could use a bool and check if its true or false, but that might lead to it not triggering at all. Example:
13:00 lux is below 70
Automation starts but sine run bool is false, it will not run.
16:00 run bool is set to true.
But now the automation cannot run since it has already done so…lux wont go below 70 until the next day.