I have a group of scripts and i want to execute the selected entry from a select bubble card. Is it possible? How to do it?
Are you saying that:
- You got three scripts - script.xxx1, script.xxx2, script.xxx3.
- There is an input_select entity with options “xxx1”, “xxx2”, “xxx3”.
- And you wish to start a particular script dependently on the selected option.
- And this call should be performed after pressing some button.
Yes?
Then create a new script which contains a call of required script taking it’s name from that input_select entity.
Yes, i solved it, but now i have another problem. I want to change the color of the bubble card select when the chosen script is executing.
I tried this:
styles: |
ha-card {
--bubble-main-background-color: rgba(255, 0, 0, 0.5) !important; /* ROSSO quando OFF */
--bubble-icon-color: #ff0000 !important;
}
ha-card[state="on"] {
--bubble-main-background-color: rgba(0, 255, 0, 0.5) !important; /* VERDE quando ON */
--bubble-icon-color: #00ff00 !important;
}
But it’s not working as the background of the card remains always red also when the script is running.
Where is my error?
And more, how to change accordingly also the icon and the icon color?