So I’ve got various automations that turn lights on or off. Some of these are time of day dependent - so the bathroom light is bright in the evening, but very dim in the middle of the night.
I accomplish this with conditional statements in the automation - so it’ll work out what the time is and set the light levels accordingly. This gets quite complex and repetitive.
Is there a better way of doing this? Can there be separate logic so that whenever a light is turned on, the time of day is evaluated and the light is set to the appropriate brightness?
One possibility I have considered is turning lights onto 1% brightness, then have another automation check for that and adjust accordingly.
Is this the best way or is there something smarter?