Skip to content

Commit 01c1f7e

Browse files
authored
Add event groups (home-assistant#28653)
1 parent fb2f619 commit 01c1f7e

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

source/_integrations/group.markdown

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ha_category:
55
- Binary Sensor
66
- Cover
77
- Fan
8+
- Event
89
- Helper
910
- Light
1011
- Lock
@@ -23,6 +24,7 @@ ha_config_flow: true
2324
ha_platforms:
2425
- binary_sensor
2526
- cover
27+
- event
2628
- fan
2729
- light
2830
- lock
@@ -38,7 +40,7 @@ The group integration lets you combine multiple entities into a single entity. E
3840
This can be useful for cases where you want to control, for example, the
3941
multiple bulbs in a light fixture as a single light in Home Assistant.
4042

41-
Home Assistant can group multiple binary sensors, covers, fans, lights, locks, media players, switches as a single entity, with the option of hiding the individual member entities.
43+
Home Assistant can group multiple binary sensors, covers, events, fans, lights, locks, media players, switches as a single entity, with the option of hiding the individual member entities.
4244

4345
{% include integrations/config_flow.md %}
4446

@@ -70,6 +72,11 @@ In short, when any group member entity is `open`, the group will also be `open`.
7072
- Otherwise, the group state is `open` if at least one group member is `open`.
7173
- Otherwise, the group state is `closed`.
7274

75+
### Event groups
76+
77+
- The group state is `unavailable` if all group members are `unavailable`.
78+
- Otherwise, the group state is the last event received from any group member.
79+
7380
### Fan groups
7481
In short, when any group member entity is `on`, the group will also be `on`. A complete overview of how fan groups behave:
7582

@@ -149,6 +156,20 @@ cover:
149156
- cover.living_room_window
150157
```
151158
159+
Example YAML configuration of an event group:
160+
161+
```yaml
162+
# Example configuration.yaml entry
163+
event:
164+
- platform: group
165+
name: "Remote events"
166+
entities:
167+
- event.remote_button_1
168+
- event.remote_button_2
169+
- event.remote_button_3
170+
- event.remote_button_4
171+
```
172+
152173
Example YAML configuration of a fan group:
153174
154175
```yaml
@@ -376,13 +397,13 @@ Old style groups can calculate group state with entities from the following doma
376397

377398
When member entities all have a single `on` and `off` state, the group state will be calculated as follows:
378399

379-
| Domain | on | off |
380-
|-------------------|----------|----------|
381-
| device_tracker | home | not_home |
382-
| cover | open | closed |
383-
| lock | unlocked | locked |
384-
| person | home | not_home |
385-
| media_player | ok | problem |
400+
| Domain | on | off |
401+
| -------------- | -------- | -------- |
402+
| device_tracker | home | not_home |
403+
| cover | open | closed |
404+
| lock | unlocked | locked |
405+
| person | home | not_home |
406+
| media_player | ok | problem |
386407

387408
When a group contains entities from domains that have multiple `on` states or only use `on` and `off`, the group state will be `on` or `off`.
388409

@@ -394,14 +415,14 @@ These groups can still be in templates with the `expand()` directive, called usi
394415

395416
This integration provides the following services to modify groups and a service to reload the configuration without restarting Home Assistant itself.
396417

397-
| Service | Data | Description |
398-
| ------- | ---- | ----------- |
399-
| `set` | `Object ID` | Group id and part of entity id.
400-
| | `Name` | Name of the group.
401-
| | `Icon` | Name of the icon for the group.
402-
| | `Entities` | List of all members in the group. Not compatible with **delta**.
403-
| | `Add Entities` | List of members that will change on group listening.
404-
| | `Remove Entities` | List of members that will be removed from group listening.
405-
| | `All` | Enable this option if the group should only turn on when all entities are on.
406-
| `remove` | `Object ID` | Group id and part of entity id.
407-
| `reload` | `Object ID` | Group id and part of entity id.
418+
| Service | Data | Description |
419+
| -------- | ----------------- | ----------------------------------------------------------------------------- |
420+
| `set` | `Object ID` | Group id and part of entity id. |
421+
| | `Name` | Name of the group. |
422+
| | `Icon` | Name of the icon for the group. |
423+
| | `Entities` | List of all members in the group. Not compatible with **delta**. |
424+
| | `Add Entities` | List of members that will change on group listening. |
425+
| | `Remove Entities` | List of members that will be removed from group listening. |
426+
| | `All` | Enable this option if the group should only turn on when all entities are on. |
427+
| `remove` | `Object ID` | Group id and part of entity id. |
428+
| `reload` | `Object ID` | Group id and part of entity id. |

0 commit comments

Comments
 (0)