Create or update a runtime entity group
automations_set_groupCreate or update a runtime group.* entity and manage its members, name, or icon; changes are temporary and vanish on restart or YAML reload.
Instructions
Create or update an old-style group.* entity at runtime.
Calls the group.set service with object_id=group_id and whichever
of name/entities/icon/all/add_entities/remove_entities were
given. The group is NOT written to groups.yaml and disappears on
restart or automations_reload_groups-style YAML reload; for a
persistent group use a Group helper or add it to groups.yaml with the
files_write_config_file tools. Does not create light/switch/cover
group helpers.
Not for: a group that survives a restart — define it in groups.yaml
instead (files_write_config_file) or create a Group helper.
Returns: dict {"status": "set", "group_id": "group.<id>"}.
Errors: returns {"error": "entities cannot be combined with add_entities/remove_entities — pass a full member list via entities, or incremental changes via add_entities/remove_entities, not both"} when
entities is given together with add_entities or remove_entities;
group.set is not called in that case.
Limits: entities replaces the whole member list and must not be
combined with add_entities/remove_entities in the same call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | MDI icon string, e.g. 'mdi:lightbulb-group'. Omit to leave it unset/unchanged. | |
| name | No | Friendly name for the group. Omit to leave it unset/unchanged. | |
| entities | No | Full list of entity_ids to set as the group's members, replacing the current member list. Omit to leave members unchanged (use add_entities/remove_entities instead). | |
| group_id | Yes | Bare group id (e.g. 'living_room_lights') — no 'group.' prefix. | |
| add_entities | No | Entity_ids to add to the existing member list. Do not combine with `entities`. | |
| all_entities | No | If True, the group's state is 'on' only when every member is on. False (default) does not clear an existing all:true. | |
| remove_entities | No | Entity_ids to remove from the existing member list. Do not combine with `entities`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||