I am trying to create an automation that chages a colour light bulb to the next color setting in a dropdown list. I have used a couple blueprints that do this, but I do not have a clue to turn this into lovelace automation.
I’m just trying to figure out how you want/need this automation to work… so far we know there’s a light and a color selection dropdown, but you haven’t provided enough info for us to know how they already relate to each other, how they need to function in relation to one another, what will trigger the automation, what conditions need to be met, etc.
Ah, sorry not enough coffee when I replied before.
We can start with a clean slate. I have a color lightbulb, and a remote switch with a spare button.
What I was hoping to have happen is for the light to go through a colour change with each press of the button. If something like this exists already I can use that. Like I said I have the blueprint for an IKEA switch, but too much of a NOOB here to know how to change it.
If you are already using the blueprint for other button functions on the remote, you probably don’t need an automation but a script. Scripts can be called like a service from a blueprint, automation, or dashboard button.
In your blueprint, you would then find the option for the button in question and select a Call Service action with script.change_input_select_update_light_color as the service.
Sorry for the very long delay. Lots happening…
OK here is where I am with this. I am writing an Automation for my Hue Remote Control. I have the Power/Bright/Dim/hue buttons. The first three are obvious, the third one I want to use to change the colour of my light to the next one in a list. The list would best be a ‘helper’ as the end goal is to make this into a blueprint with different helper scripts for different bulbs.
This problem I am having is the button does not do anything when pressed. Even weirder is then I go back into the YAML editor my code has been changed to this:
As you can see the second line: ‘-service: input_select.select_next’ is missing. The only difference is I did not create a script, instead I put the code into the automation.
No idea what I am doing wrong. So close yet to far away…
In the months since I posted that example the key service has been soft-deprecated in preference for action. You can use either one, but not both.
A couple notes on using colorname:
As Afraskai noted above, occasionally you will run into lights that are not compatible with the use of colorname.
You need to use the CSS3 color names. If the options of the Input Select are different values, you can use templating to translate them to the appropriate value.