From 77410e81783378046feaeefced459fca2a3591d7 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 11 Jul 2024 09:37:47 +0200 Subject: [PATCH] Add button group support (#33681) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/group.markdown | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/_integrations/group.markdown b/source/_integrations/group.markdown index ee8bca181be..a08bbdc56b3 100644 --- a/source/_integrations/group.markdown +++ b/source/_integrations/group.markdown @@ -3,6 +3,7 @@ title: Group description: Instructions on how to setup groups within Home Assistant. ha_category: - Binary sensor + - Button - Cover - Event - Fan @@ -62,6 +63,13 @@ Binary sensor, light, and switch groups allow you set the "All entities" option. - Otherwise, the group state is `off` if at least one group member is `off`. - Otherwise, the group state is `on`. +### Button groups + +The group state is the last time the grouped button was pressed. + +- The group state is `unavailable` if all group members are `unavailable`. +- Otherwise, the group state is the last time the grouped button was pressed. + ### Cover groups In short, when any group member entity is `open`, the group will also be `open`. A complete overview of how cover groups behave: @@ -144,6 +152,19 @@ binary_sensor: - binary_sensor.door_right_contact ``` +Example YAML configuration of a button group: + +```yaml +# Example configuration.yaml entry +button: + - platform: group + name: "Restart all ESPHome devices" + device_class: opening + entities: + - button.device_1_restart + - button.device_2_restart +``` + Example YAML configuration of a cover group: ```yaml