Home Assistant history: missing scroll-zoom function
The integrated Home Assistant history does not yet have a scroll and zoom function for the history.
By default, the time period can only be selected via a calendar and predefined time periods: "Today", "Yesterday", "This week", etc: For a specific time period, the date and time must be laboriously adjusted in the calendar. Therefore i implemented at least Previous and Next- Buttons which are Part of Home Assistant since the 2024-12 Release, see New: Home Assistant history: previous and next buttons.
Certain other visualizations already havve a scroll function for seamlessly switching to an earlier or later point in time. In addition, a zoom function for a more precise analysis of a specific time period would be an enormous enrichment. Grafana could serve as a model for this.
In progress
Status 2024-12: The Home Assistant developers are currently working on a zoom function.
The source code uses the Chart.js plugin for zoom functions. A preview is available on the official Chart.js website: https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/usage.html.
Development status: Currently, only one chart is zoomed in the development version if there are several charts. There is also no option to reset the zoom to the initial value. It is also not yet possible to scroll to an older area.
I have created a pull request for zoom in and out using additional buttons: https://github.com/home-assistant/frontend/pull/23358
Alternatives
- Plotly Graph
- Advantage: flexible incl. the possibility to visualize historical data
- Disadvantages:
- Advanced Config in YAML
- No date selection available
- cannot be called directly from any entity without creating your own dashboard
- Similar possible improvement:
Relevant communication / feature request on Github
- https://community.home-assistant.io/t/wth-cant-we-zoom-in-on-the-history-graph/222391
- https://community.home-assistant.io/t/wth-cant-i-zoom-in-or-out-on-history-graphs/467734
- https://community.home-assistant.io/t/wth-can-t-i-zoom-in-or-out-on-history-graphs/802568
Pull-Requests:
- https://github.com/home-assistant/frontend/pull/22947
- https://github.com/home-assistant/frontend/pull/23358 and
- https://github.com/home-assistant/frontend/pull/23183.
{{percentage}} % positive