My first Hubitat app! Coding tips / other feedback welcome.
Naturalight divides the day into eight periods where one period slowly fades into the next, allowing your eyes to adjust with no abrupt changes, reducing the perception of lighting changes. The design concept was as follows.
Early morning starts with warm white lighting, fades into cold white lighting as morning progress, and transitions back to warm white lighting in the late afternoon. In the evening, bulbs that are only Color Temperature-adjustable are dimmed separately while Color bulb lighting levels stay high as they are switched to color mode and tinted slightly orange. As the evening continues, CT bulbs are switched off and Color bulbs become deeper orange.
This scheme provides you with strong blue-shifted light during the day to promote wakefulness and improve mood. During the evening, your home's blue lighting is reduced and nearly eliminated, prompting your body to relax and increase melatonin production before you go to bed to aid in sleep quality.
Naturalight allows you to intermingle Color bulbs with CT bulbs, which typically are half the cost. Why run 3 Color bulbs in a fixture at 30% when you can run 1 Color bulb at 100% and turn the other two cheaper bulbs off?
The Naturalight Home (parent) app sets global values that all Room (child) apps will import, so you only have to set everything up once for the home. However, the room apps allow global settings to be overridden on a per-setting basis, allowing refinement per room.
Instructions are included within the apps' preference pages.
Copy this link and import the Parent App directly to your Hubitat Apps page.
Copy this link and import the Child App directly to your Hubitat Apps page.
Or, see the GitHub file below:
https://github.com/brandonspitza/hubitat/tree/main/apps/Naturalight
Brandon Spitza