diff --git a/source/_integrations/group.markdown b/source/_integrations/group.markdown index 2a1dd64e847..210322595da 100644 --- a/source/_integrations/group.markdown +++ b/source/_integrations/group.markdown @@ -11,6 +11,7 @@ ha_category: - Media Player - Notifications - Organization + - Sensor - Switch ha_release: pre 0.7 ha_iot_class: Calculated @@ -27,6 +28,7 @@ ha_platforms: - lock - media_player - notify + - sensor - switch ha_integration_type: helper --- @@ -98,6 +100,13 @@ In short, when any group member entity is `unlocked`, the group will also be `un - Otherwise, the group state is `on` if at least one group member is not `off`, `unavailable` or `unknown`. - Otherwise, the group state is `off`. +### Sensor groups + +- The group state is combined / calculated based on `type` selected to determine the minimum, maximum, latest (last), mean, median, range or sum of the collected states. +- Members can be any `sensor`, `number` or `input_number` holding numeric states. +- The group state is `unavailable` if all group members are `unavailable`. +- If `ignore_non_numeric` is `false` then group state will be `unavailable` if one member is `unavailable` or does not have a numeric state. + ## Managing groups To edit a group, **{% my helpers title="Settings -> Devices & Services -> Helpers" %}**. Find and select the group from the list. @@ -190,6 +199,18 @@ media_player: - media_player.living_room_tv ``` +Example YAML configuration of a sensor group: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: group + type: mean + entities: + - sensor.temperature_kitchen + - sensor.temperature_hallway +``` + Example YAML configuration of a switch group: ```yaml @@ -219,6 +240,27 @@ all: required: false type: boolean default: false +type: + description: "Only available for `sensor` group. The type of sensor: `min`, `max`, `last`, `mean`, `median`, `range`, or `sum`." + type: string + required: true +ignore_non_numeric: + description: Only available for `sensor` group. Set this to `true` if the group state should ignore sensors with non numeric values. + type: boolean + required: false + default: false +unit_of_measurement: + description: Only available for `sensor` group. Set the unit of measurement for the sensor. + type: string + required: false +device_class: + description: Only available for `sensor` group. Set the device class for the sensor according to [available options](/integrations/sensor/#device-class). + type: string + required: false +state_class: + description: Only available for `sensor` group. Set the state class for the sensor according to [available options](https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes). + type: string + required: false {% endconfiguration %} ## Notify Groups