From 8aa97d02c50ba45463f1c16f025d923f6896132c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 4 Oct 2016 13:23:17 +0200 Subject: [PATCH] Add docs for statistics sensor (#999) * Add docs for statistics sensor * Minimizing of the configuration sample * Fix typo --- source/_components/sensor.statistics.markdown | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/_components/sensor.statistics.markdown diff --git a/source/_components/sensor.statistics.markdown b/source/_components/sensor.statistics.markdown new file mode 100644 index 00000000000..d2cc7e2a206 --- /dev/null +++ b/source/_components/sensor.statistics.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "Statistics Sensor" +description: "Instructions how to integrate statistical sensors into Home Assistant." +date: 2016-09-28 12:10 +sidebar: true +comments: false +sharing: true +footer: true +logo: home-assistant.png +ha_category: Sensor +ha_iot_class: "Local Polling" +ha_release: "0.30" +--- + + +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. + +To enable the statistics sensor, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: statistics + entity_id: sensor.cpu + - platform: statistics + entity_id: binary_sensor.movement +``` + +Configuration variables: + +- **entity_id** (*Required*): The entity to monitor. +- **name** (*Optional*): Name of the sensor to use in the frontend. +- **sampling_size** (*Optional*): Size of the sampling. If the limit is reached then the values are rotated. Defaults to `20`. +