I have a script that depending on the light out side switch on the light and sets the brightness to 10% or if it´s brighter outside don´t switch on the light.
However I would like to add that if the light is already on it should leave the light as it is, is there somebody having an idea how to solve it within a script. It should be like IF light is on DO nothing ELSE “and then my existing template”
I have not tried it but when I read about as I understood it will stop the script completely, I have other things below this switching on other lights and switches that I would like to be executed.
And create an automation that will turn on the light using a condition.
That way, the script will run no matter what, but the extra automation will decide based on the conditions if the light will turn on or not.