History panel: add screenshot and download function (#31185)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
c0ffeeca7 2024-02-02 08:56:20 +01:00 committed by GitHub
parent 7bfa533135
commit 0e8e80bb53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 1 deletions

View File

@ -11,7 +11,7 @@ ha_domain: history
ha_integration_type: system ha_integration_type: system
--- ---
The `history` integration will track everything that is going on within Home The **History** integration tracks everything that is going on within Home
Assistant and allows the user to browse through it. It depends on the [`recorder`](/integrations/recorder/) Assistant and allows the user to browse through it. It depends on the [`recorder`](/integrations/recorder/)
integration for storing the data and uses the same database setting. integration for storing the data and uses the same database setting.
If any entities are excluded from being recorded, If any entities are excluded from being recorded,
@ -24,7 +24,33 @@ This integration is by default enabled, unless you've disabled or removed the [`
history: history:
``` ```
## Exporting data from the History panel
You can access the **History** panel from the side bar. To export the data, follow these steps:
1. Select the areas, devices, or entities of interest.
2. Set the time frame.
3. In the top right corner, select the **Download data** button.
**Result**: Your data is exported in CSV format.
<img class="no-shadow" src='/images/integrations/history/history-panel_export-data.png' alt='History panel can be accessed via sidebar.'>
## About the data sources
By default, the recorder stores the sensor data for 10 days. Older data is purged automatically. The data for the last 10 days is taken from the recorder.
If you select a time frame that exceeds 10 days, the data is taken from the long term statistics table. The long term statistics data is sampled and averaged once per hour, to save storage. Therefore, the values might look different from what you see from the recorder data, which shows the measured values at the sample rate defined for that sensor.
<img class="no-shadow" src='/images/integrations/history/history-panel_including-long-term-storage.png' alt='If the chosen time frame exceeds the retention period defined in the recorder, the long term statistics table is used as a data source.'>
If you want to see the data in full resolution for a longer period of time, you could change the retention period for that sensor in the recorder. If you do this, you may need to increase the storage capacity of your device.
## API ## API
The history information is also available through the The history information is also available through the
[RESTful API](/developers/rest_api/#get-apihistory). [RESTful API](/developers/rest_api/#get-apihistory).
## Related topics
- [Recorder integration](/integrations/recorder/)
- [Home Assistant Data Science Portal](https://data.home-assistant.io)

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB