Hi all,
I know there are a number of threads on here to do with lighting automation and setting different light levels based on time of day. I wondered if we could collate the solutions and discuss pros and cons.
Personally, I am using a formula to sort the light level out based on time of day and similar formula to decide when the automation should run (offsets of sunrise and sunset). I wondered if anyone has anything better?
integer((3.82 * ($hour24 + ((1 / 60) * $minute)))-((0.4 * ($hour24 + ((1 / 60) * $minute))) ** 2) + 10 + if((8 < $hour24) && ($hour24 < 17), ($hour24 + ((1 / 60) * $minute)) * 3, if((17 < $hour24) && (($hour24 + ((1 / 60) * $minute)) <= 20.5), $hour24 + ((1 / 60) * $minute), 0)))
As requested:
The piston updates the current light level variable which is used every time a light is switched on in other pistons and also sets the level of any light which is currently on.