mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 21:36:52 +00:00
Add statistical_mode
and median
to templating docs (#30297)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
07d67c47e2
commit
f70f3e71df
@ -905,6 +905,8 @@ The numeric functions and filters raise an error if the input is not a valid num
|
||||
- `max([x, y, ...])` will obtain the largest item in a sequence. Uses the same parameters as the built-in [max](https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.max) filter.
|
||||
- `min([x, y, ...])` will obtain the smallest item in a sequence. Uses the same parameters as the built-in [min](https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.min) filter.
|
||||
- `average([x, y, ...], default)` will return the average value of the sequence. If list is empty or contains non-numeric value, returns the `default` value, or if omitted raises an error. Can be used as a filter.
|
||||
- `median([x, y, ...], default)` will return the median value of the sequence. If list is empty or contains non-numeric value, returns the `default` value, or if omitted raises an error. Can be used as a filter.
|
||||
- `statistical_mode([x, y, ...], default)` will return the statistical mode value (most frequent occurrence) of the sequence. If the list is empty, it returns the `default` value, or if omitted raises an error. It can be used as a filter.
|
||||
- `e` mathematical constant, approximately 2.71828.
|
||||
- `pi` mathematical constant, approximately 3.14159.
|
||||
- `tau` mathematical constant, approximately 6.28318.
|
||||
|
Loading…
x
Reference in New Issue
Block a user