Hello sanojjonas,
You have to define what light you want use with this script.
Click where it says entity (entiteit) and type light.the_light_you_want_to_use
Hello sanojjonas,
You have to define what light you want use with this script.
Click where it says entity (entiteit) and type light.the_light_you_want_to_use
how do i add that script to the automation?
i can only find how i turn on/off a script but not excecute a script.
(again i’m a noob)
In automation creation when you ‘Add Action’ just type in ‘ashley’, select it and then fill in the required information.
i feel very dumb, i tried this yesterday and it didn’t show up, but now it functions.
and the script functions perfectly
Dumb question(s)…
Does the script always start from 0 brightness?
Can it be used in reverse to dim lights? If so, how?
Thanks!
![]()
(Great script by the way - really helpful!)
It will ‘fade’ from wherever the lights currently are to the target value. I use this on my way to bed at night where my ceiling lights fade over a 30 second period while my bedside lamp fades up to 75%, works like a charm.
Thanks! That’s great to know. ![]()
Hi Ashley,
thanks for the great script!
But as soon as I enable “End color temperature”, the script won’t run any more…
- action: script.ashley_s_light_fader
data:
lampBrightnessScale: zeroToOneHundred
easingTypeInput: easeInOutSine
endBrightnessPercent: 7
endBrightnessEntityScale: zeroToOneHundred
shouldStopIfTheLampIsTurnedOffDuringTheFade: true
shouldResetTheStopEntityToOffAtStart: false
shouldInvertTheValueOfTheStopEntity: false
minimumStepDelayInMilliseconds: 100
shouldTryToUseNativeLampTransitionsToo: false
isDebugMode: false
light: light.led_mr_t_leuchte
transitionTime:
hours: 0
minutes: 0
seconds: 30
endColorTemperatureKelvin: 3850
I have another script in which I use RGB-Colors and that works…
Could you tell me what I’m doing wrong?
Kind regards,
Alex
Love this!! Exactly what I was looking for to slowly dim up in the morning and down at night a plant feature wall! I’m using it to control some DMX lights with through Artnet DMX integration. Worked perfectly first time. Simple, configurable, user friendly and it doesn’t put any undue stress on the CPU of Home Assistant. Thank you Ashley. ![]()
I haven’t implemented the script yet, but I’m already impressed. First, by the effort and dedication that went into creating a script that, just by looking at the lines of code, is clearly not something overly simple. Second, by the customization options. And third, and perhaps most importantly, by the thoroughness of the explanation and documentation. Even the installation process is written out so clearly. I believe that even someone who just started using HA would be able to implement this script with ease!
Congratulations on the amazing work!
Lovely work,
I need to fade up to a particular color (RGBW) lights, but there is no way I can define an End color. and since the lights are starting from off, in some random color, there is no way to predict what color the fade will end up at.
TLDR, I really want a “End Color or color temp” feature.
Firstly what a great script @handcoding, thank you.
I have a small issue with my Hue lights using the script. The lights are triggered by Motion sensor & buttons.
My issue is on first trigger the light comes on dim but then only fades up after a second trigger.
Thanks for the great script. Have it working on a few lights in the house.
Haven’t figured out how to just fade just color temperature and not brightness. The visual editor does not show end brightness as optional. If I delete the “end brightness” line in YAML, running the script gives an error. I’d like to just change temperature at whatever the current brightness is. How can I achieve this?
did you figure this out I get same error?
Hi Ashley, many thanks for this great code. I would be really happy if some day you or someone in the community launches a RGB version.
I’m trying this script with two different types of smart lights, but running into the same issue - when the automation triggers the script, it turns on the light at the lowest brightness, but then nothing else happens. The maximum brightness is set to much higher than 1%, yet the level never changes after the light turns on. Any ideas what might be going wrong? Even with debugging turned on, the log just says that the script was triggered and the light entity was turned on, no further details.
I had this exact issue, and seeing your comment, I decided to poke around some more.
“
Cancel the fade if the lamp is turned off during the fade?” seems to be broken, at least for fading from “0%” (off). I disabled this setting and lights now turn on / fade up.
Thank you so much for making this! Such a neat solution, definitely helped me out!
This script looks very nice, but I have some additions and remarks.
Currently, you can only select one device (does it choose a device or entity?)
It would be nice if multiple devices can be attached.
There is an ending color temperature in kelvin, but no starting (I want to start it from 2200K to 2400K for example).
HUE lightbulbs, such as the 8719514392830 support color temperature, however this script seems to rely on a specific attribute which isn’t always supported:
Stopped Ashley’s Light Fader because a color fade was requested for HUE Left, but its current color temperature doesn’t seem to be defined using Kelvin units. (You can look into this by going into Developer Tools and checking that HUE Left has a defined “color_temp_kelvin” attribute.)
The attributes of this specific bulb:
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4504
min_mireds: 222
max_mireds: 454
effect_list:
- blink
- breathe
- okay
- channel_change
- candle
- finish_effect
- stop_effect
- stop_hue_effect
supported_color_modes:
- color_temp
effect: null
color_mode: null
brightness: null
color_temp_kelvin: null
color_temp: null
hs_color: null
rgb_color: null
xy_color: null
friendly_name: HUE Bedroom Left
supported_features: 44
Could this receive an update targeting these specific cases?
My current workaround is to turn on the light first and then apply this script, because only then it will accept the kelvin setting.
@FPSUsername For multiple devices you should use the Home Assistant Group integration which allows you to group multiple entities together into a “single entity” … this will allow you to control multiple lights not only from this script but from any automation.
@handcoding However, I am also having the same kelvin issue and I also had to turn on the lights, do a delay and then run your script since the bulbs report no temperature while off.