I’ve been going around in circles for a few days now and getting nowhere so I’ve run out of ideas and would like some help from the community.
I have 3 separate WLED controllers and I want to be able to select the presets on all of these with a single button press.
I have this setup with the help of a Mushroom Template card which calls a script as follows:
type: custom:mushroom-template-card
primary: Starter
secondary: ''
icon: mdi:led-strip
entity: input_boolean.starter
layout: vertical
icon_color: green
tap_action:
action: call-service
service: script.get_preset
data:
outerPreset: input_text.button_1_outer
matrixPreset: input_text.button_1_matrix
shelfPreset: input_text.button_1_shelf
target: {}
The input text comes from a page I created where the presets can changed.
Script
alias: Get Preset
sequence:
- service: select.select_option
data:
option: "{{ states(outerPreset) }}"
target:
entity_id: select.outer_lights_preset
- service: select.select_option
data:
option: "{{ states(matrixPreset) }}"
target:
entity_id: select.ceiling_matrix_preset
- service: select.select_option
data:
option: "{{ states(shelfPreset) }}"
target:
entity_id: select.bar_lights_preset
mode: single
This works just fine but I have more than one button and I want the currently selected button to be green and all the others to be red. Then when I select another pattern I want that to be green and all the others to be red.
This is what it currently looks like:
Would really appreciate some pointers on how to achieve this.