I use this script on a daily basis and it really improves my life in a small subtle way.
I do think I might hav found a bug though, or a limitation?
Using a light group created in home assistant (spanning lights in both a zha and z2m network) the script fails if I fade from off and use the option fade to colour temperature kelvin.
Ashley’s Light Fader: Error executing script. Error rendering template for variables at pos 6: ZeroDivisionError: division by zero
Checking the attributes for the light group (while off) in tools I find this:
min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
effect_list: blink, breathe, candle, channel_change, colorloop, cosmos, enchant, finish_effect, fireplace, glisten, none, off, okay, opal, sparkle, stop_effect, stop_hue_effect, sunbeam, sunrise, sunset, underwater
supported_color_modes: color_temp, xy
effect: null
color_mode: null
brightness: null
color_temp_kelvin: null
hs_color: null
rgb_color: null
xy_color: null
entity_id: light.z_utelys_huset, light.garasjeport_lys_light
friendly_name: utelys_g
supported_features: 44
And the attributes while on:
min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
effect_list: blink, breathe, candle, channel_change, colorloop, cosmos, enchant, finish_effect, fireplace, glisten, none, off, okay, opal, sparkle, stop_effect, stop_hue_effect, sunbeam, sunrise, sunset, underwater
supported_color_modes: color_temp, xy
effect: off
color_mode: color_temp
brightness: 166
color_temp_kelvin: 2352
hs_color: 29.294, 78.165
rgb_color: 255, 153, 56
xy_color: 0.562, 0.389
entity_id: light.z_utelys_huset, light.garasjeport_lys_light
friendly_name: utelys_g
supported_features: 44
After searching I guess what I’m experiencing is related to color_temp_kelvin: null?