Skip to content

Commit fcf5d3a

Browse files
authored
Add min/max sensor docs (home-assistant#1232)
1 parent 256fb8b commit fcf5d3a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
layout: page
3+
title: "Min/max Sensor"
4+
description: "Instructions how to integrate min/max sensors into Home Assistant."
5+
date: 2016-10-13 12:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: home-assistant.png
11+
ha_category: Sensor
12+
ha_iot_class: "Local Polling"
13+
ha_release: "0.31"
14+
---
15+
16+
17+
The `min_max` sensor platform is consuming the state from other sensors and determine the minimum, maximum, and the mean of the collected states. The sensor will always show you the highest/lowest value which was received from your all monitored sensors. If you have spikes in your values, it's recommanded filter/equalize your values with a [statistics sensor](/components/sensor.statistics/) first.
18+
19+
It's an alternative to the [template sensor](/components/sensor.template/)'s `value_template:` to get the average of multiple sensors.
20+
21+
```yaml
22+
{% raw %}{{ ((float(states.sensor.kitchen_temperature.state) +
23+
float(states.sensor.living_room_temperature.state) +
24+
float(states.sensor.office_temperature.state)) / 3) | round(2)
25+
}}{% endraw %}
26+
```
27+
28+
To enable the minimum/maximum sensor, add the following lines to your `configuration.yaml`:
29+
30+
```yaml
31+
# Example configuration.yaml entry
32+
sensor:
33+
- platform: min_max
34+
entity_ids:
35+
- sensor.kitchen_temperature
36+
- sensor.living_room_temperature
37+
- sensor.office_temperature
38+
```
39+
40+
Configuration variables:
41+
42+
- **entity_ids** (*Required*): At least two entities to monitor
43+
- **type** (*Optional*): The type of sensor. Defaults to `max`.
44+
- **name** (*Optional*): Name of the sensor to use in the frontend.
45+

0 commit comments

Comments
 (0)