Skip to content

Commit

Permalink
Remove configuring group members through configuration.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Oct 14, 2024
1 parent 1156e83 commit f31ec0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
16 changes: 4 additions & 12 deletions docs/guide/configuration/devices-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebarDepth: 1

# Devices and Groups

Zigbee2MQTT also stores the definitions of Devices and Groups in the `configuration.yml`.
Zigbee2MQTT also stores the definitions of devices and groups in the `configuration.yml`.

Most options are optional, only the IEEE address (or MAC) as the `key` and a `friendly_name` are required.

Expand Down Expand Up @@ -148,7 +148,8 @@ device_options:

## Groups

You can define groups of devices which are applied to the Zigbee network. Also see the [Groups guide](../usage/groups.md).
Groups can be defined in the `configuration.yaml`, devices can be added to the group via the frontend or [MQTT](../usage/mqtt_topics_and_messages.md#group).
See the [groups guide](../usage/groups.md) for more information.

```yaml
groups:
Expand All @@ -160,19 +161,10 @@ groups:
transition: 2
# Optional: Change group state when one of the devices in it changes state, see 'State changes' below (default: true)
optimistic: true
# Optional: Devices of this group,
# Note: This can be the ieeeAddr of the device or the friendly_name (default: empty)
devices:
- 0x84fd27fffe4082ca
- 0x000b3cfffef8ed66
# Only add specific endpoint to the group
- 0x000d6ffffee405eb/1
- 0x001788010818fc75
- some_device_friendly_name
```

::: warning
The Group-key has to be unique and a quoted integer.
The group key has to be unique and a quoted integer.
:::

## Extract config to separate files
Expand Down
14 changes: 7 additions & 7 deletions docs/guide/usage/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
Zigbee2MQTT has support for Zigbee groups. By using Zigbee groups you can control multiple devices simultaneously with one command.

::: tip
Groups can also be managed via the frontend _Groups_ tab.
Groups are much more efficient than controlling devices separately as it significantly reduces the stress on a network when controlling multiple devices at once.
:::

## Creating a group
Groups can be created via the frontend (easiest), [MQTT](./mqtt_topics_and_messages.md#zigbee2mqttbridgerequestgroupadd) or by adding them to the `configuration.yaml` as shown below.

## Configuration

Add the following to your `configuration.yaml`.
Expand All @@ -27,19 +30,16 @@ groups:
optimistic: true
# Optional: Control when state OFF is published for a group, see "State changes" below (default: all_members_off)
off_state: 'all_members_off'
# Optional: Devices of this group,
# Note: This can be the ieeeAddr of the device or the friendly_name (default: empty)
devices:
- '0x00158d00018255df'
- 'some_device_friendly_name'
```
The groupID (in the above example `'1'`) should be a numerical string. In case you want to use a hexadecimal groupID (e.g. `0xe24c`) you should first convert it to a numerical string (e.g. `57932`).

If using the Hassio add-on, restart it after modifying your `configuration.yaml` as above.
If using the Home Assistant add-on, restart it after modifying your `configuration.yaml` as above.

## MQTT commands

To add, remove, rename and change the options of a group, see [MQTT Topics and Messages groups section](./mqtt_topics_and_messages.md#group)

Devices can also be added/removed from groups via MQTT, the possible topics are:

- `zigbee2mqtt/bridge/request/group/members/add`: add a device to a group
Expand Down

0 comments on commit f31ec0c

Please sign in to comment.