I’d love to create entity groupings of my lights based on criteria such as all lights of type X or all lights that start with the word “Overhead” etc.
Is this possible? For the record, I don’t want this just in Lovelace, but specifically create groups (entities) with these filtered criteria. I have over 150 smart devices, so this would save a lot of time.
It’s not totally clear what you want, if all you want to do is select these groups of lights in automations you can use templates. For example this will turn on all lights that are off that have “lounge” in the entity id.
The search selector is regex. e.g. (lounge) captures all with lounge in the entity_id.
You can use selectattr() for the state or any attribute the entity has. This probably does not include “type” of light. So unless you name your entity id’s with this or add custom attributes to your lights (see: Customize) then that is not going to be possible.
You can also reject sections based on attributes or states, e.g. all lights that have a brightness less than 50%
Though the brightness attribute is only available when your light is on, so be careful with that, make sure you have selected lights that are on first.
Thanks Tom. This is helpful and will likely get me what I need.
I think it would be incredible if someone built UI that helps users create their criteria. If anyone is interested in doing the dev work, I can help with the form design.