Step Light Brightness with Template in Automation

What’s so advanced about it? Copy the example to your system and use it. It’s far better than diddling with delays and scripts to create a clumsy version of looping.

If you need help using the suggested python_script, let us know and we’ll walk you through it.

Are you sure your light supports brightness (0-255) or does it perhaps want a brightness_pct (0-100)?

Your example works great after some minor modification. Unfortunately I have found that my light sources need 10 seconds between commands which makes a small step ramp-up of brightness very time consuming, especially if multiple lights are included.

Another question; if I want to do this for say five lights in one automation, do I need to write two scrips per light according to your example or are there better ways not to repeat code over and over? Send the identity ID to the script through template?

Yes, you can pass variables to a python_script. The light fader script accepts parameters.

Were you responding to me or to 123? Depends on what route you chose I guess :slight_smile:
I’m curious if you got it working to your satisfaction.

1 Like

Hi, yes, I got it working. Thanks alot for your help. I hope to pass on my aquired knowledge to someone else some day!