diff --git a/docs/guide/configuration/devices-groups.md b/docs/guide/configuration/devices-groups.md index 7477bb578a98..7a447fbf9b80 100644 --- a/docs/guide/configuration/devices-groups.md +++ b/docs/guide/configuration/devices-groups.md @@ -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. @@ -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: @@ -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 diff --git a/docs/guide/usage/groups.md b/docs/guide/usage/groups.md index 0d5aac1b0657..088458a63386 100755 --- a/docs/guide/usage/groups.md +++ b/docs/guide/usage/groups.md @@ -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`. @@ -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