Color Loop Blueprint with Configurable Colors and Transition Time

You can add the script as an item to the overview page which gives you a Run/Cancel link for a given script.

  1. Edit the Overview/Dashboard page
  2. Click + Add Card
  3. Search by Entity and type in the name of the script
  4. Check the checkbox for the script you want
  5. Click CONTINUE
    2022-06-05_10h42_20
  6. Click ADD TO DASHBOARD
    2022-06-05_10h42_38
  7. You now have a card which you click Run or Cancel to control the script.
    2022-06-05_10h43_06
    You can also select more scripts to have the card have multiple scripts or select lights and their corresponding scripts.

Also clicking on the script’s name will give you an edit link (pencil icon) to the script so you can easily update the colors or transition times.

The main issue (from what I can tell) with the automation you were using was it was triggered by a schedule process every single second. These types of things, while possible, are usually only intended for running a handful of times a day and not every second.
I think the main issue is not that the automation gets triggered so frequently, but that it would also logging this occurrence every single second in the history and logbook (unless you manually disable the logging) which would lead to all of these pointless database entries occurring.

I do agree it’s kind of annoying that there is no stop button in the UI Scripts page, only a Play button, but I figure most scripts are intended to be a “do something once” type of command.

The looping portion could be changed to be an automation, but (I haven’t tested this) I do not think turning off the automation would stop the loop, it would only stop the original triggering condition from starting a new process.

This is why the while loop in this script has the condition that the light has to be on in order to continue looping.

Hmmm, I’m not sure why this would occur, I haven’t had issues with this except when I was trying out adding light groups in my comment above. Regardless, adding the script Run/Cancel link to the dashboard will stop the looping to a new color (although if its halfway to its next color it will continue to the next color and stop)

1 Like