[Under New Management] Interactive history explorer custom card

Hy Community,
Is it possible to combine 2 different units in only one graph (line).

type: custom:history-explorer-card
cardName: historycard-14420595
defaultTimeRange: 5d
combineSameUnits: true
uiLayout:
  toolbar: show
  selector: hide
header: []
entityOptions:
  sensor.epex_spot_price_ct_per_kwh:
    color: blue
  sensor.energiegesamtverbrauch_aktuell:
    color: green

Sorry, if I missed a comment.

Thanks

Hello Maijo. You should read the first post. I don’t think this is the place where you can get help.

Hey Alex. I’m a heavy user of the card, and am sorry to see you go. Thanks for all the work done. I’ll keep using your card for as long as it works

Thanks Petro for the clarifications. Takes some guts to recognize that you’ve been acting less than optimal.

I was not aware of this feud, since I don’t follow forums. Typically because of this kind of flame wars that always seem to happen some times, and where people leave because they just don’t feel at home anymore (and probably never will again). (Side-story: I have two friends that won’t talk to one another anymore, and hate each other’s guts. Before that, they shared a common passion for 10 years, and talked and joked in-person at the forum get-together each year. All this because they started talking politics over a forum :confused: And I’m not talking teenagers, they’re both in their fifties)

Alex, I wish you good luck in your future endeavors, and thanks a million again for this very useful card.

Hi all,

I was wondering of there is enough enthusiasm to revive this great card. There are places like this one GitHub - rejuvenate/rejuvenate: Dead Repositories Revived by the Community, where abounded projects are given a second life.

I’m not knowledgable to code myself, but willing to moderate and help testing. Bottom line reviving needs enough members motivated to contribute to the card.

So if you would like to contribute, let me know. This great card deserves a chance :grinning:

4 Likes

I wonder if it is possible to use any int values for a “defaultTimeRange” option?

type: custom:history-explorer-card
cardName: abcdef
graphs:
  - type: timeline
    entities:
      - entity: sun.sun
defaultTimeRange: 20h

image

In my tests only some values were really accepted.
For instance:

no way this is 20 hrs, more likely ~48 hrs. (sorry - 24 hrs probably)

Hacked it by forced calling “setTimeRangeMinutes” in “setTimeRangeFromString”.

Should work. Is this the only graph you are using? And did you reload?

Only, others are commented. Besides, it has a unique “cardName”.
So, I believe this make the card independent.

Reload (menu), refresh (F5) - nothing helps.

I suspected that inputted value of “defaultTimeRange” is kind of filtered.
Check this code with my comments:

    setTimeRangeFromString(range, update = false, t_center = null)
    {
        ......
        # t = minutes from "range"
        const h = Math.floor(t / 60);  # h = hours

        if( h > 0 )
            this.setTimeRange(this.validateRange(h, true), update, t_center);
        else
            this.setTimeRangeMinutes(t, update, t_center);
    }

and “validateRange” using some “ranges” array.
I had only a quick glance, not a proper analysis - and I made a suggestion that the “validateRange” does a filtering.
At least after removing 3 lines starting from “if” I gained a desired output ))).

Deleted for the moment. Did it wrong.

1 Like

History-explorer-card is the only card I know which allows to show a timeline (a horizontal bar-like graph) with a possibility to hide time scale (a picture of a stock history-graph is below):

image

Lines & text may be made transparent by card-mod; but the text causes a timeline bar to have different margins dependently on:

  • available width;
  • current time;
  • hours_to_show.

As for my hacky “fix” of the history-explorer-card: excluding the “validateRange” function from “setTimeRangeFromString” only allows to bypass that “filtering” for the “defaultTimeRange” option; for other use-cases like “period selected by a magnifier” the “filtering” still works, it’s OK.

Hello, anyone familiar with this problem and especially how to solve it. this is the same sensor above and below.
the red value is consumption, the green value is generation. the value of the generation is correct, and if there is no generation the red value is also correct.
In the Home assistant graph the values are always correct.

Which entity from the 2nd card is shown on the 1st card with a standard history-graph?

The red one, (look at the yellow arrow in the yaml)

I asked because different names are displayed on these cards.

Yes, that’s right, I changed the name in the bottom graph to a more friendly name

So, an entity with this entity_id
image

has this friendly name, right?
image

Just to be 100% sure that these are same entity.

Shame, it’s not maintained anymore. Is there any active fork or alternative? The only I can find is Plotly and Apex, but it’s more general purpose charts, not dedicated for history data.

It is still working without problems.

I really love this card too, honestly it’s one of the core add-ons that makes Home Assistant usable for me.

So I decided to try and fork the library here and hope to continue development:

But I’ve been having trouble figuring out how to actually build it as there’s no automated build, and few notes on how it was built or what versions of dependencies were used.

If anyone wants to lend a hand, it would be greatly appreciated, originally I just wanted to write some additional docs for it, and I’m a bit worried that the lack of build process will be a blocker.

11 Likes

Yes,

Excellent. Good luck, I hope you will get it working. Maybe original author is still available and he could help?

I installed your repo into HACS and then installed the card. It works so far.

I did not previously have the card installed on this machine. So it seems to work.

Not sure what you think needs “building”.

Happy to help. Let us know what you need.

The original author uploaded a copy of the dependencies in the env, which is incredibly helpful!

So yeah, I’m still trying to get the builds to be reproducible, (so that I can modify the source, and then build a new version of the minified output.)
Just trying to test that out, and then hopefully development can continue on this addon

2 Likes