I can totaly agree. History is one of the core functions of Home Assistant. It cannot keep up with other systems and does not comply with the otherwise very modern smart home software. I tried myself in understanding the Source Code and was able to add at least a Previous and Next-Button to be able to move between the timeranges. It is Part of Home Assistants since the 2024-12-Release, see: add previous and next button to History and Logbook by boern99 · Pull Request #22802 · home-assistant/frontend · GitHub. We now try to improve the styles, so that the buttons can also be used on mobiles. As a next step, I currently also try to add buttons for Zoom-In and Out. Buttons are a quick win because they can be added relatively easily into the existing source code. To be able to scroll or zoom: This is more demanding: Looks like a new base would probably be necessary.
I also added some Information on this on my website[New: Home Assistant history: previous and next buttons]
Other aspects of the History card (I really don’t want to add a fresh WTH as it dilutes the votes)
- Reorder the entities
- deselect entites from view (but don’t delete from card).
- more flexible time/date picker - e.g. not just last year but last 12 months or last x months or since date x (same for days/hours laxt 7 days 12hrs etc - this is different to ‘last week’).
- Save a view
Hi @baz123
Thanks for your interest and your contribution to improving this card in HA. There are certainly many other good and useful ideas that could be brought in.
Here just one more example:
The ability to hide the multiple timestamps in the X-axis and display them as desired. This would also make the graphs clearer, as I often find it pointless to see this information multiple times on one card, especially when you could work with the “readout cursor”, which I aske for in the linked feature request above
It would be ideal, for example, if you could flexibly choose how the time axis stamps are displayed:
- Either as it is now, with one time axis stamp per graph.
- Or only display it once (top or bottom or in the middle of several graphs)
- Or display it twice (top and bottom)
- Or display it three times (top, bottom and middle)
- Or maybe even display it dynamically, so that there is only one timeline stamp, but it jumps when you scroll and so stays always visible.
Of course, it all depends on how many graphs you want to display at the same time and how you work with them, but it could definitely be helpful.
I use PlotlyJS card to explore history. The data selection engine is awesome, it allows you to select any data from HA, transform and combine them and present them in a nice UI. It’s not built-in but it wiill do the job until the history graph evolves.
Is there any Christmas present?
Great. In August, I wrote my request in the existing WTH, before even opening the new WTH month. I hope more development will be done on this as requested earlier. From what I’ve been reading, not all proposals will be implemented. For now, it’s great, but in the long run, it might be a missed opportunity. But let’s celebrate this update.
Yeah, i tried new history in latest beta. It looks very good, zoom in and out works fine, but for now sadly only within default 24 hours (shown history when window is opened). Going back to yesterday, two days…is still not available - when sliding back too far graph becomes blank. Hopefully author is working on this, too. But for now things are looking good and i appreciate every effort!
Also tested it already during beta, still basic but looks very promising. Nevertheless It’s a big step into the right direction and gives already big improvement comparing to the situation as of today. Big thank you to the contributior. Not yet sure if it is enough for a solution of this WTH as is it covers more aspects in the meantime.
I also tested it in beta. There’s no 24hr limit on pan and zoom, but the graph still respects the time and date limit that’s set in the interval picker. So if you set that to a year or whatever, you can zoom to any 5 min interval if you want. But zooming out on a graph with a 24hr limit will not automatically grab the missing data.
Not bad for a first release, hopefully it will be enhanced with automatic pan/zoom beyond the limits.
Completely agree here on needing improved history. Even making the week (“this week”) and month (“this month”) select the week or month to-date instead of a bunch of days in the future that have no data and provides no value would be much better.
For a zoom/scroll interface that works well, a model is Ableton, the music software. With their interface if you hold the mouse on a point on a waveform and move the mouse up/down it zooms in out at that point like a pinch in/out for mobile. If you move right/left then it drags the waveform right/left like a one finger swipe in mobile and a flick of the mouse will keep it moving with deaccelerstion when you release like a flick in mobile - another click will stop the waveform moving .
Yeah, that’s what we need… going back without re-selecting interval.
Also, what tman98 said: having day/week for selecting (like in history card) would be a great idea…
nice zoom and pan function!
when you have “connected” graphs you have to be careful since you might have different timebase on each of them.
it would be good to do syncronisation of the zoom on connected charts.
As above:
“it would be good to do syncronisation of the zoom on connected charts”
Absolutely!
@MindFreeze how about it?
We plan to add this but it is not trivial and will take time to implement well
There’s another more serious problem (IMHO) - when using the companion app the history graph’s detailed information popups no longer scroll with the graphs.
See: 2025.1 history graph problem with companion app
EDIT: this is being resolved:
I was so happy when I read about this being implemented and while it works on my computer (ctrl+scroll), pinch to zoom doesn’t seem to work on my phone in Companion App (Android). Am I missing something or was this update not meant for pinch to zoom?
Pinch zoom works for me, so it might be something in your app?
- now deleted
Yeah it must have been something on my end as it works now, perfect.
The new zoom/pan is great but it seems to have introduced a noticeable and distracting flicker on all graphs during page loads - seems like it might be due to an update animation setting in the graphs. It would be nice if that would be configured (perhaps it can be already).