Turn on switches with motion based on Sun Elevation

OK please think also about add option setup hours…

But also please this about add condition to we can select other switch and if this switch is ON automation not run.
Example
I think to use motion in my bethroom. Automation i want use to switch LED. But if other switch is on in bethroom( light ) i want to not run automation.

i understand what you want… i just dont know how to implement it…

You dont want a light to be turned on… then get tripped by motion sensor… then turn off when the timer is up because you already turned the light on for a reason…

I just dont know how to do that…

BUT… youre welcome to take my code and modify it to do that and then give it back to the community…

No. I need only add one condition. In this conditionn will be add switch2. And if this switch was ON no run automation.

But maybe you can tell me how create automation in GUI now as now works your blueprint . I mean with restart timer when every motion detect motion. Because i dont know how it write.