Add data availability note to Recorder's get_statistics action (#39615)

This commit is contained in:
Abílio Costa 2025-06-23 07:12:02 +01:00 committed by GitHub
parent 269a59d6a4
commit 98dba51851
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,6 +257,10 @@ 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).
{% endnote %}
| Data attribute | Optional | Description |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `statistic_ids`| no | The entity IDs or statistic IDs to get statistics for. |