Add sum to min_max (#25045)

This commit is contained in:
G Johansson 2022-11-24 20:32:19 +01:00 committed by GitHub
parent d601bac57e
commit 88eb5b373c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,11 +17,11 @@ ha_platforms:
ha_integration_type: helper
---
The Min/Max integration consumes the state from other sensors to determine the minimum, maximum, latest (last), mean, median, and range of the collected states.
The Min/Max integration consumes the state from other sensors to determine the minimum, maximum, latest (last), mean, median, range and sum of the collected states.
The sensor provided by this integration will always show you the lowest/highest/latest value which was received from all monitored sensors. If you have spikes in your values, it's recommended to filter/equalize your values with a [statistics sensor](/integrations/statistics) first.
If the source sensor provides an unknown state, it will be ignored in the calculation. If the unit of measurement of the sensors differs, the Min/Max sensor will go to an error state where the value is `UNKNOWN` and unit of measurement is `ERR`.
If the source sensor provides an unknown state, it will be ignored in the calculation except for sum where it will set the state to unknown. If the unit of measurement of the sensors differs, the Min/Max sensor will go to an error state where the value is `UNKNOWN` and unit of measurement is `ERR`.
{% include integrations/config_flow.md %}
{% configuration_basic %}
@ -30,9 +30,9 @@ Name:
Input entities:
description: At least two entities to monitor. All entities must use the same unit of measurement.
Type:
description: The type of the sensor, this can be either "min", "max", "last", "mean", "median", or "range".
description: The type of the sensor, this can be either "min", "max", "last", "mean", "median", "range" or "sum".
Precision:
description: Round the calculated mean or median value to at most N decimal places.
description: Round the calculated mean, median or sum value to at most N decimal places.
{% endconfiguration_basic %}
## YAML Configuration
@ -57,7 +57,7 @@ entity_ids:
required: true
type: [list, string]
type:
description: "The type of sensor: `min`, `max`, `last`, `mean`, `median`, or `range`."
description: "The type of sensor: `min`, `max`, `last`, `mean`, `median`, `range` or `sum`."
required: false
default: max
type: string