Add switch groups (#22176)

This commit is contained in:
Franck Nijhof 2022-03-28 13:29:59 +02:00 committed by GitHub
parent 04325e72c1
commit c713378903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ ha_category:
- Media Player - Media Player
- Notifications - Notifications
- Organization - Organization
- Switch
ha_release: pre 0.7 ha_release: pre 0.7
ha_iot_class: Calculated ha_iot_class: Calculated
ha_quality_scale: internal ha_quality_scale: internal
@ -21,6 +22,7 @@ ha_platforms:
- cover - cover
- fan - fan
- light - light
- switch
- media_player - media_player
- notify - notify
--- ---
@ -30,7 +32,7 @@ The group integration lets you combine multiple entities into a single entity. E
This can be useful for cases where you want to control, for example, the This can be useful for cases where you want to control, for example, the
multiple bulbs in a light fixture as a single light in Home Assistant. multiple bulbs in a light fixture as a single light in Home Assistant.
Home Assistant can group multiple binary sensors, covers, fans, light, media players as a single entity, with the option of hiding the individual member entities. Home Assistant can group multiple binary sensors, covers, fans, light, media players, switches as a single entity, with the option of hiding the individual member entities.
{% include integrations/config_flow.md %} {% include integrations/config_flow.md %}
@ -118,6 +120,17 @@ media_player:
- media_player.livivng_room_tv - media_player.livivng_room_tv
``` ```
Example YAML configuration of a switch group:
```yaml
# Example configuration.yaml entry
switch:
- platform: group
entities:
- switch.tv
- switch.soundbar
```
{% configuration %} {% configuration %}
entities: entities:
description: A list of entities to be included in the group. description: A list of entities to be included in the group.
@ -132,7 +145,7 @@ unique_id:
required: false required: false
type: string type: string
all: all:
description: Only available for `binary_sensor` and `light` groups. Set this to `true` if the group state should only turn *on* if **all** grouped entities are *on*. description: Only available for `binary_sensor`, `light` and `switch` groups. Set this to `true` if the group state should only turn *on* if **all** grouped entities are *on*.
required: false required: false
type: boolean type: boolean
default: false default: false