mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 14:56:53 +00:00
Add long-term statistics to glossary (#39954)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
c0fa7d1681
commit
f7e08e96c6
@ -636,3 +636,7 @@
|
||||
link: /integrations/zone/
|
||||
aliases:
|
||||
- zones
|
||||
- term: Long-term statistics
|
||||
definition: >-
|
||||
Home Assistant saves long-term statistics for a sensor if the entity has a state_class of measurement, total, or total_increasing. For short-term statistics, a snapshot is taken every 5 minutes. For long-term statistics, an hourly aggregate is stored of the short-term statistics. Short-term statistics are automatically purged after a predefined period (default is 10 days). Long-term statistics are never purged.
|
||||
link: /blog/2021/08/04/release-20218/#long-term-statistics
|
||||
|
@ -1418,7 +1418,7 @@ For example: `heat_cool`.
|
||||
## Statistic selector
|
||||
|
||||
The statistic selector selects the statistic ID of an entity that records
|
||||
long-term statistics. It may resemble an entity ID (like `sensor.temperature`),
|
||||
{% term "Long-term statistics" %}. It may resemble an entity ID (like `sensor.temperature`),
|
||||
or an external statistic ID (like `external:temperature`).
|
||||
|
||||

|
||||
|
@ -258,7 +258,7 @@ Perform the action `recorder.enable` to start again saving events and states to
|
||||
Perform the action `recorder.get_statistics` to retrieve statistics for one or more entities from the recorder database. This action is useful for automations or scripts that need to access historical statistics, such as mean, min, max, or sum values, for supported entities like sensors.
|
||||
|
||||
{% note %}
|
||||
Statistics are only available for entities that store [Long-term Statistics](https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics). More details can be found in the [2021.8.0 release notes](/blog/2021/08/04/release-20218/#long-term-statistics).
|
||||
Statistics are only available for entities that store {% term "Long-term statistics" %}
|
||||
{% endnote %}
|
||||
|
||||
| Data attribute | Optional | Description |
|
||||
|
@ -25,7 +25,7 @@ The statistics sensor can use either the numeric sensor or binary_sensor as its
|
||||
Assuming the [`recorder`](/integrations/recorder/) integration is running, historical sensor data is read from the database on startup and is available immediately after a restart of the platform. If the [`recorder`](/integrations/recorder/) integration is *not* running, it can take some time for the sensor to start reporting data because some characteristics calculations require more than one source sensor value.
|
||||
|
||||
{% tip %}
|
||||
The statistics integration is different from [Long-term Statistics](https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics). More details on the differences can be found in the [2021.8.0 release notes](/blog/2021/08/04/release-20218/#long-term-statistics).
|
||||
The statistics integration is different from {% term "Long-term statistics" %}.
|
||||
{% endtip %}
|
||||
|
||||
The statistics sensor has an internal buffer that stores the values it needs for the computation of the various functions (for example, average step). The sensor is updated whenever new values are added to the buffer or when elements are removed. This is triggered either by a change of the source sensor (which may or may not change its actual value) or by values expiring (in cases where max age was specified). This means that the buffer can hold a sequence of identical values in cases where values are not changing over time.
|
||||
|
@ -1833,7 +1833,7 @@ sensor:
|
||||
required: true
|
||||
type: template
|
||||
state_class:
|
||||
description: "The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor. This will also display the value based on the user profile Number Format setting and influence the graphical presentation in the history visualization as a continuous value. If you desire to include the sensor in long-term statistics, include this key and assign it the appropriate value"
|
||||
description: "The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor. This will also display the value based on the user profile Number Format setting and influence the graphical presentation in the history visualization as a continuous value. If you desire to include the sensor in {% term "Long-term statistics" %}, include this key and assign it the appropriate value"
|
||||
required: false
|
||||
type: string
|
||||
default: None
|
||||
|
Loading…
x
Reference in New Issue
Block a user