Create or Update Group
ha_config_set_groupCreate or update a service-based Home Assistant entity group, primarily for compatibility with existing YAML-configured groups. Supports adding, removing, or replacing entities.
Instructions
Create or update a service-based Home Assistant entity group via the group.set service.
When NOT to use: for typical "combine these entities into one controllable group"
requests, prefer ha_config_set_helper(helper_type="group", ...). Config-entry-backed
groups are registered in the entity registry, so ha_set_entity can assign them to
areas and they are deletable via ha_remove_helpers_integrations.
When to use: compatibility with existing groups already configured via group.set
or YAML, or the rare case where entity-registry membership is explicitly unwanted.
Groups created here are only removable via ha_config_remove_group —
ha_remove_helpers_integrations will not find them.
For NEW groups: Provide object_id and entities (required). For EXISTING groups: Provide object_id and any fields to update.
EXAMPLES:
Create group: ha_config_set_group("bedroom_lights", entities=["light.lamp", "light.ceiling"])
Create with name: ha_config_set_group("sensors", entities=["sensor.temp"], name="All Sensors")
Update name: ha_config_set_group("lights", name="Living Room Lights")
Add entities: ha_config_set_group("lights", add_entities=["light.extra"])
Remove entities: ha_config_set_group("lights", remove_entities=["light.old"])
Replace all entities: ha_config_set_group("lights", entities=["light.new1", "light.new2"])
NOTE: entities, add_entities, and remove_entities are mutually exclusive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Material Design Icon (e.g., 'mdi:lightbulb-group') | |
| name | No | Friendly display name for the group | |
| wait | No | Wait for group to be queryable before returning. Default: True. Set to False for bulk operations. | |
| all_on | No | If True, all entities must be on for group to be on (default: False) | |
| entities | No | List of entity IDs for the group. Required when creating new group. When updating, replaces all entities (mutually exclusive with add_entities/remove_entities). | |
| object_id | Yes | Group identifier without 'group.' prefix (e.g., 'living_room_lights') | |
| add_entities | No | Add these entities to an existing group (mutually exclusive with entities) | |
| remove_entities | No | Remove these entities from an existing group (mutually exclusive with entities) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||