Add date/time ranges to History Graph Card

Add the ability to select a date/time range for the History Graph Card similar to the History Panel. Either by adding the functionality to the UI of the card itself or by adding template functionality to the hours_to_show field (or something similar).

Since the 2022.7 update, the History Panel functionality has changed in such a way that I can not use it as an overall quick glance of all information about my system. It’s now a very manual process with many steps to show what you want, not a premade setup that is always ready to look at. Therefore, I am moving my History Panel info to individual History Graph Cards on different dashboards and it would be great to have the ability to add a similar data/time selector to make them more interactive.

Similar to this request. Vote for boh.

I’ve started using the below card as a permanent replacement for the History Panel and History Graph Card. These features make it a huge improvement:

  • Easily recreate the existing History Panel with timelines and graphs. Colors can be transferred over so it looks identical and it can be added to the sidebar to mimic existing panel
  • Duration selector at the top to quickly pick timeframes to view
  • Graphs can be panned by dragging the mouse to show (all graphs move together)
  • All dates/times line up vertically, which was is a major nuisance with the existing History Panel
  • Entities can be setup manually in YAML so a default, defined view is always immediately ready (similar to the old History Panel)
  • Entities can be added on the fly using the entity picker drop down (this can be pre-filtered to only those entities that are actually recorded in your database with recordedEntitiesOnly: true)