Following up on my Astronomical Data API post…
This is the piston I use to set the light levels throughout the house automatically adjusted for twilight and mode. The levels change according to actual twilight, not just a set timeframe to sunrise/sunset. That time it takes to go from day to night or night to day changes throughout the year.
It automatically calculates the number of steps and seconds between the steps to smoothly brighten or darken the lights based on the astronomical data (time of year).
All of my in-wall switches are from Inovelli. One of the things that I like about them is that you can set the brightness level while they are off. This piston sets the level for when they are next physically pressed. By using their child device here, this piston doesn’t change the brightness of the light that’s already on, it changes the brightness of what will be the next time it’s pressed.
It also sets the level for when we turn in for the night. Most of these devices are the bathroom lights, shower lights, etc.
In the evening, the piston starts to set the levels from my daytime setting (90% full) down to 40% full. By the time dusk settles in, they are at 40% which is plenty bright for the evening. In the morning, they ramp up the other way so they are pack at my daytime level by the time the sun rises.
The other neat thing here is when we change ST over to night mode, they are all set to 15% brightness so no one gets blinded when they turn on the bathroom lights in the middle of the night!
We don’t have a door between the bathroom and bedroom in our master suite. Now, when either of us is in bed, we don’t get blinded when the other turns on the light over our master vanity. It starts at 15% brightness instead of 100%!
It all works seamlessly and really works well. If you have color changing LEDs, you could use this same logic to adjust the color temperature based on the circadian time stamps from the global API.