Skip to content

Instantly share code, notes, and snippets.

@suhajdab
suhajdab / getCircadianValues.js
Last active August 26, 2022 22:22
Calculate Color Temperature and Brightness for current time in HomeyScript
/**
* Adjust Color temperature and Brightness based on time of day
* as if it were April 16th, a nice long spring day in southern Sweden
*/
const VARIABLE_PREFIX = 'CircadianRhythm_';
const MIN_BRIGHTNESS = 0.12;
const MAX_BRIGHTNESS = 1;
const sys = await Homey.system.getInfo();