[Under New Management] Interactive history explorer custom card

Haha, it’s a different world with its own rules. But you get used to it after a while, even though it always feels awkward, especially for a C++ guy like me :yum:

You’re doing well!

If it would reduce performance, you should skip this, as everyone could set up a template sensor for such requests as well and display this instead.

3 Likes

V1.0.14 is up and adds longer time ranges. Up to 1 month can now be selected from the dropdown and you can scroll through up to 3 months worth of data.

My own database doesn’t go that far. I couldn’t really test all performance aspects for a larger database. So if anyone with a history going back that far could have a look at how the card performs, especially on the 1 Month range setting, I’d love some feedback. The data decimation part might need some tuning. On very busy graphs, with lots of very short delay state changes, performance could suffer quite a bit with this amount of data.

This release also adds the possibility of removing the UoM labels and resizing (or removing) the label name area.

2 Likes

Awesome thx.

Hi Alex,
thanks for your real great card.
Is there a way to remove the text “History Explorer” at the top of the card?

Thanks
Markus

Please read the thread or the examples of the github page. Asked more than once before.

Hi Alex.

Great card, congratulation! Long time waiting for that kind of solution for graphs.

Is there a chance that we will be able to zoom closer - in minutes or even seconds?
And could be there a possibility to set an initial time range in minutes or seconds??

Most HA charts have the disadvantage that are not able to show a time range shorter than 1 hour. And sometimes we look for fast-changing states where an hour resolution is far from being enough.

Thanks a lot - it looks as if I have been blind or it already was too late :upside_down_face: - I read the github page more than once…

Not too sure about seconds, but I can see a closer range of a few minutes being useful for diving into data with very short pulses or state changes. I will have to find a way to handle this in the range dropdown UI, because if I keep adding new preset ranges, the list will become really cluttered (it already kinda is). Especially on browsers that ignore the hidden flag for dropdown elements (Safari, looking at you here…).

1 Like

I am not sure, so just a hint - maybe the possibility of putting data by hand (as an option) could be a kind of solution? Are You familiar with Grafana? There are presets that could be changed by hand.

image

V1.0.17 is up and lets you zoom into the data much deeper than before, down to one minute over the graph. Time ranges shorter than 1 hour can’t be selected as presets in the time range dropdown (< 1H is shown), but you can use the different zoom features to smoothly zoom in and out.

The YAML config now also supports setting shorter time range as defaults.
Examples:

defaultTimeRange: 2m    # 2 minutes
defaultTimeRange: 1h    # 1 hour
defaultTimeRange: 2d    # 2 days
defaultTimeRange: 3w    # 3 weeks
2 Likes

V1.0.18 is up ! You can now export the raw history data of your entities as a CSV file for further processing and I added a new option to automatically group line graphs with compatible units into single graphs as you add them.

image

1 Like

You know, someone will ask if Export to CSV is available as a service so it can be automated…

Thanks by the way for your ongoing work.

Hehe well it would make sense if you think about it. But adding a service would require an actual integration rather than a card.

Well you need another project don’t you?

Oh yeah, my SO would definitely enjoy me picking up yet another project she’s not involved in :wink: And it would require me to learn Python. I hate Python. I think I’ll leave that to someone else… (that said, it would be trivial to implement).

This is the card I’ve been waiting for! Fantastic. Thank you.

Glad you like it ! Let me know if you find some missing features, feedback is always welcome.

Hi Alex,

five less important topics after using your card with pleasure now for longer time:

  1. Do you have an idea how to remove the centered line in the bar-chart?
    image
    This separator is only between two rows, so it is not neeed if I only have one row. It looks fine if you have 2, 3, 4, 5 rows.

  2. And if I have predefined charts and some added via +. And if I press then x to remove them again, the predefined charts are gone as well, and I have to reload the page, that the re-appear. Wanted behavior?

  3. Any chance to have styling attributes for the x button and input box as well? Currently, I use

    card_mod:
      style: |
        button {
          background-color: #2e2e2e;
          border:none;
          color: #ffffff
        }
        input {
          background-color: #2e2e2e;
          border:none;
          color: #ffffff
        }

What solves, what I need, but of course, card_mod is always an overhead in each card and adds UI time.

  1. Any way to hide h1 instead of only showing an empty line? If having a space, no title is shown, but still the line (gap). Currently, I’m using.
    card_mod:
      style: |
        h1 {
          display: none;
        }
  1. Any way to have the export csv arrow when hiding the toolbar. I would like to have this feature in cards without having the feature to add more entities on the fly.