Add/remove entities from group from lovelace? ("Dynamic groups")

Hi.
I have a Node-Red flow that is doing light effects (colorloops ect)
Let’s say I have these three entities for light that I want to do colorloop on:

  • light.celling
  • light.behind_tv
  • light.under_sofa
    Sometimes celling and behind_tv, sometimes behind_tv and under_sofa, sometimes under_sofa and celling.

groups are great to do same things with a group of entities, but what if i want these entities to be different. can I in some way make a dynamic group that entities can be added/removed from in lovelace?
Lets say the group is group.light_effects.

image

You assign the group.set to the tap actions of your ‘Add’ buttons and the group.remove service to your ‘Remove’ buttons.

looks like i can use group.set to:

  • add entity to grup
  • Replace all entities with X
  • Replace all entities with nothing (use [] o clear)

What I can’t do is:

  • Remove only one or some of the entities in a group

group.remove I think can only remove the whole group, not single entities in it.

I got this to work btw, like this:

1 Like