I want to control my light, which does not have a fade option, over the Google Assistant but with a fade. Both light and Google Assistant are connected through Home Assistant.
I can already control the light over my Google device but it jumps to the value. I would prefer a smooth fade. For this I found this script (Ashley’s Light Fader: fade lights with your choice of easing (curves), including ease-in, ease-out, and ease-in-out) but it seems that I have to set a certain value to which it always goes to. Is it possible that I can just say “Set lights to 40%” and it takes this value to fade to this value? And then “Set lights to 90%” and it also fades to the right value? So basically that every change of brightness results in the correct usage of the fade?
I found out that I can use a helper (input number) for this. If I connect this helper to the script and check “Use an entity instead for the end-brightness value?” it kind of works. Instead of having a set value I now can let the script fade to whatever value I want. But this isn’t convenient. Also, I want to use my lamp via Google Home as one device and not as one lamp and one thing that lets it determine to which value it should fade to. Is there any opportunity to make this process better and probably in a way Home Assistant was built for?
In the actions tab of the automation I found the opportunity to declare variables. This sounds better but it seems that I can only use a set number or an entity for this script.
Is there any way of making this fading script work for any value that I want?