Skip to content

Commit 8aa97d0

Browse files
authored
Add docs for statistics sensor (home-assistant#999)
* Add docs for statistics sensor * Minimizing of the configuration sample * Fix typo
1 parent 01da8ce commit 8aa97d0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: page
3+
title: "Statistics Sensor"
4+
description: "Instructions how to integrate statistical sensors into Home Assistant."
5+
date: 2016-09-28 12:10
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.30"
14+
---
15+
16+
17+
The `statistics` sensor platform is consuming the state from other sensors. Beside the maximal and the minimal value also the total, the mean, the median, the variance, and the standard deviation are as attributes available. If it's a binary sensor then only the state changes are counted.
18+
19+
To enable the statistics sensor, add the following lines to your `configuration.yaml`:
20+
21+
```yaml
22+
# Example configuration.yaml entry
23+
sensor:
24+
- platform: statistics
25+
entity_id: sensor.cpu
26+
- platform: statistics
27+
entity_id: binary_sensor.movement
28+
```
29+
30+
Configuration variables:
31+
32+
- **entity_id** (*Required*): The entity to monitor.
33+
- **name** (*Optional*): Name of the sensor to use in the frontend.
34+
- **sampling_size** (*Optional*): Size of the sampling. If the limit is reached then the values are rotated. Defaults to `20`.
35+

0 commit comments

Comments
 (0)