From 98dba5185125183117c4cbad062e6d94ea2aa329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Mon, 23 Jun 2025 07:12:02 +0100 Subject: [PATCH] Add data availability note to Recorder's get_statistics action (#39615) --- source/_integrations/recorder.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 6c1ecc8a587..cd6700f640a 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -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. |