Hi @GaryOz,
sorry, but I can’ t explain everything because I didn’ t program the script and I’ m not a programmer. Also, my process is a bit different from the one described by the author.
Don’t know, sorry. And I don’t know why they calculate to 2 digits after the decimal point, because the script does it automatically.
Yes
Please change the name of the variables as follows (only with one underscore):
CircadianRhythm_brightness
CircadianRhythm_temperature
This is how my solution looks like:
Script
Found in post #16
Numeric variables in better logic app
CircadianRhythm_brightness
CircadianRhythm_temperature
Numeric variables in Homey
(more → logic; you can name the variables as you like)
CircadianDim
CircadianTemp
Flow 1
(to set the BL variables into Homey variables)
Flow 2
(turn on lamp with the current logic values)
Flow 3
(change of temperature when the lamp is on. The same for brightness)
The result
(Insights graph, 24 h)
Info:
You can change these parameters in the script according to your own needs.
const MIN_BRIGHTNESS = 0.35;
const MAX_BRIGHTNESS = 0.75;
const MIN_TEMPERATURE = 0.3;
const MAX_TEMPERATURE = 0.8;
I hope it is a little bit helpful.