Having tried a variety of things I have hit a brick wall so looking for help!
Issue - I am trying to create a Lovelace picture card where I can place mushroom chips (or similar) which when tapped add them to a grroup. The goal being that group can then be used with a colour-wheel to set multipe LEDs to the same setting. It was all going perfectly until I realised group.xxx cannot be used with the colour-wheel of custom:light-entity-card and to the best of my knowledge you cannot use the service group.set to add to a light group.
What I have done so far is:
- created a picture entity with mushroom-chips for LED spotlights:
with an extract of the card yaml being:
type: picture-elements
image: local/floorplan_ground2.png
elements:
- type: custom:mushroom-chips-card
style:
top: 16.75%
left: 82%
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-spacing: 50;
margin-right: 34px;
--chip-height: 30px;
}
chips:
- type: light
entity: light.playroom_l5
content_info: none
card_mod:
style: |
ha-card {
--chip-background: {% if "light.playroom_l5" in state_attr("group.dynamic_lights","entity_id") %} pink
{% else %} white
{% endif %}
}
tap_action:
action: call-service
service: script.group_change
service_data:
selected_light: light.playroom_l5
with the script being a simple:
alias: Group change
sequence:
- service: group.set
data:
object_id: dynamic_lights
add_entities: "{{selected_light}}"
mode: single
However this is a dead-end as it needs to be a light group for the custom card. Any ideas please???
(on a side topic I have used the style template for changing the background of a chip based on whether it is in group.dynamic_lights, which means I replacate the code for each and every bulb - is there a better way that can do this by calling a routine which passes the entity_id somewhere?)
Any help hugely appreciated.
S.