Create Group Blueprint
This blueprint creates a group with either static or dynamic members.

It has two main functions to add members
- Dynamically include multiple members based on a common string in their object ID’s. (
Dynamic Include List
) - Or statically add individual members. (
Static Entities To Add
)
Then the group can be refined by
- Dynamically excluding multiple members based on a common string in their object ID. (
Dynamic Exclude List
) - Or statically removing individual members. (
Static Entities To Remove
)
Group Types
Simple (Static) Group
- If you would like to create a group and manage its members manually, you only need to use the
Static Entities To Add
field to select entities.- If you add or remove devices from home assistant, the group will need to be updated manually.
Dynamic Group
- If you would like members to be automatically added or removed from the group, use the
Dynamic Domain List
,Dynamic Include List
, andDynamic Exclude List
fields and enter identifying strings.- You can still add or remove members statically by using the
Static Entities To Add
orStatic Entities To Remove
fields.
- You can still add or remove members statically by using the
Recommended Steps for Creating a Dynamic Group
First familarize yourself with domain and object_id state objects.
Start with a broad brush.
- Add a domain in
Dynamic Domain List
. Example: - light - Add a string in
Dynamic Include List
. Example: - bedroom - Save the automation and run it.
- View the group created, (Configuration → Entities → in the search bar enter ‘group’, click the group) and its members.
- Make note of the members that need to be removed and strings they have in common.
- If necessary, edit the object IDs of the members and add identifiers to make them easier to exclude.
Then narrow the scope.
- Go back to the automation and in
Dynamic Exclude List
add a list of common strings to exclude. - Save and run the automation then go back to the group to view updated list members.
Rince and repeat.
- Continue this process until only the members you want are in the group.
Order of Operation
This blueprint follows a specific order of operation when adding members to a group.
- If a domain is entered in
Dynamic Domain
, all entities in those domain are added to an internal list. Otherwise all entities are added to the list ifDynamic Include List
orDynamic Exclude List
are used. - If an include string is entered in
Dynamic Include List
, only entities with object ID’s containing that string remain in the list. - If an exclude string is entered in
Dynamic Exclude List
, all entities with that string are removed from the list. - Then static members are added or removed from the list
a. If specific entities are selected inStatic Entities To Add
, those entities will be added to the list.
b. If specific entities are selected inStatic Entities To Remove
, those entities will be removed from the list.
Field Types
Dynamic Domain List
, Dynamic Include List
, and Dynamic Exclude List
Strings entered in these fields need to be entered as a yaml list. For example:
- light
or for multiple strings
- light
- lock
Static Entities To Add
, and Static Entities To Remove
Multiple entities can be added to these fields. If devices are added, expand the device and remove unnecessary entities.
Notes
- The only way to see what entities are added to the group is to actually view the group members.
- Recommend opening two home assistant windows, one with the automation (Configuration → Automations) and another with the entities list (Configuration → Entities) filtered for ‘group’.
-
Dynamic Domain List
,Dynamic Include List
, andDynamic Exclude List
fields are lists and need to be entered with a hyphen, then a space, then the string. Example: - light - Automations created with this blueprint are ran at home assistant start and when groups are reloaded (Configuration → Server Controls → Click Groups, Group Entities… ). Groups will be recreated at this time also.
- If you would like to update groups while home assistant is running, all you have to do is run the automation.
- To delete a group, delete the automation that created it and restart home assistant or reload the groups.
Credits
Portions of this blueprint are from the following repositories or posts
1 post - 1 participant