[Deprecated] Interactive history explorer custom card

The upcoming version will add monthly as an option to the existing intervals for total increasing values. A month starts on the first day and ends on the last day of the month though. Adding an offset to that is a little strange. I guess it’s for your billing period ? You can create a FR on github if this is something you really need.

Hi,
Yes it is for my billing period,
this feature is kinda missing from eveywhere
apexchart can’t do it, energy dashboard can’t do it …

I find it very strange that no one has implemeted it :slight_smile:
I can do a FR indeed.

thx for your help

I can’t find this in the HACS “Add Repository” options…am I missing something here?

I found the card, but now don’t understand how to add it to my dashboard or how to setup a entity to monitor…

Can this be added to the sidebar of HA?

If you want to add a dynamically configurable card simply add a custom card

type: custom:history-explorer-card

If you want to have a card which always portrays the same set of entities, follow the instructions on github.

V1.0.32 is now up with the new entity info panel integration. It also adds monthly intervals for total increasing values (nice when combined with long term statistics) and fixes an annoying LTS bug.

By default, info panel integration is disabled. You will get the normal, native HA info panels. To enable the override, open the pulldown menu on a history explorer card and select Enable history info panel:

image

Once enabled, all entity history info panels throughout HA will now use the history explorer card, with all its interactive functions. You can disable the integration by selecting the above menu option again. You do not have to restart HA or anything, all is on the fly.

Once the info panel option is enabled, you can directly start using the new info panels, no configuration required. Optionally you can customize them by adding YAML under the infoPanel key on the configuration of any history explorer card on your dashboard. Most config options that work with the normal history explorer custom card will also work for the info panel. Notably, entityOptions and stateColors. Check the readme.

Example:

infoPanel:
  lineMode: stepped
  entityOptions:
    humidity:
      color: green
    temperature:
      fill: rgba(0,0,0,0)
    energy:
      color:
        '0': '#3e95cd'
        '2': '#b5342d'
        '0.5': '#66a61e'

image

If you don’t want a history explorer custom card on your dashboard ( :cry: ), but you still want the new info panel overrides, then you can remove the custom card once you turned on the info panel feature and optionally did the custom configuration.

The info panel override feature works with most versions of HA since 2022.4, you don’t need the most recent HA installed (but it’s obviously supported too !).

As usual, feedback welcome !

14 Likes

I tried that, copied your text exactly and got this error:

Then maybe you haven’t installed the card (use HACS) or your browser cache needs clearing, or perhaps a restart of HA.

This is fantastic and works well.

Override is not working, the pulldown menu has no selections for it. I have installed the updated .js, refreshed browser cache, restarted HA. Using Home Assistant 2022.11.2.
Otherwise custom history card works normally and I have used it before this.

Now it works. I’m using manual installation and for some reason it was still using .31 version even after I removed the resource and deleted the file and replaced with new one. But when I renamed .32 version and added it as a new resource it started to work and use that version. There is a cache somewhere…

This is soooooooooooooooo great. A pitty, that they did this disliked changes, but of course, your replacement is even better.

Three questions or FRs:

  1. What is wrong, that
    infoPanel:
      uiColors:
        buttons: '#2e2e2e'

does not have a affect? Or not supported (yet)?

  1. Any chance to get the Show more link to the history on your replacement back again? Perhaps the whole line with title and link? To have the chance to jump and to have it consistent to old view and log. Perhaps as a yaml option to switch this on?

image

image

  1. The infoPanel-Customization seems to be deleted, if you go to another page with a history explorer chart, where this is not defined. Would be great if it stays as defined in (only) one card and switched on from there.

HI Alex,

as usual: thx!

was thinking, the one the thing I did like about the native more-info, was a Show more button, taking us to the full history state .

Would you be able to add that back to the new panel?

(edit, rereading other comments I now see exactly 1 post above… sorry @arganto …)

(struggling with an odd error after updating to HA 2022.11.2, so cant restart for the moment…)

ok, fixed the above, so could restart, and seeing the options in the more-info now. cool.

however, I can not make the step to show:

even though I have:

- title: History
  icon: mdi:history
  path: history
  type: panel
  cards:
    - type: custom:history-explorer-card
      showUnavailable: false
      recordedEntitiesOnly: true
      lineMode: stepped
      uiLayout:
        selector: top
      infoPanel:
        lineMode: stepped

on my main history-explorer panel view.

the stepped does work on that panel view itself…

does this option maybe not work across different dashboards? because my panel is in another dash than the entity I show above

See my investigations in the topic above as well. For me it is working, as long it is reset on another view. Hopefully a quick fix for the history explorer genius.

What do you think about an ability/button to copy the yaml of the current viewed graphs needed for the card?
This would be very helpful in configuring a view graphically

@arganto @Mariusthvdb, I’ll see what happens with multiple cards when I get home tonight. It did work with multiple cards here, but not on different dashboards. Is it only the user config that isn’t correctly handled or does the override itself fail (ie. you’re seeing the original native HA panel) ? If the former, did you try to just copy the infoPanel section to the HE card on the other dashboard too ?

I guess. Where would it point to ? The original history sidebar ? Or maybe configurable URL ?

Re. button colors, probably not yet supported. I have to check the source tonight.

it is the user config, I do see the H-E- card more info’s.

dont have that tbh, I only use HE as dedicated panel view in a dedicated dashboard, (hoping that setting would be used by all other more-infos in any dashboard.)

I just added this:

  - type: custom:history-explorer-card
    header: 3 Fase totaal
    lineMode: stepped
    graphs:
      - type: line
        entities:
          - entity: sensor.calculated_totaal_l1_power
          - entity: sensor.calculated_totaal_l2_power
          - entity: sensor.calculated_totaal_l3_power
# globally used in more-info panels
    infoPanel:
      lineMode: stepped

as a placeholder for the

    infoPanel:
      lineMode: stepped

and that has the desired effect on the more info panels.

It does introduce another issue though…: it also shows the entities I selected in my panel view below the entities in this config and the dropdown.

Clicking the X to delete them from this individual card, also deletes them from the larger panel view, where I had carefully selected some entities to track

It would be awesome if 2 types of settings could be available:

a panel view option, (as a replacement for the deceased core history panel), where we can select the entities interactively and semi-permanently with the current selectors (as is, really, its perfect)

a card view option, without the selectors, and only use a given set of (yaml) configured entities. Indecently from the panel view option, and not including those entities/selectors.
(without setting a cardName: history-card-5, this seems to no be seen as individual… which is suboptimal, and no auto-default is set apparently)

Having a globally valid more-info setting would additionally be the best of all!

We can fix all of the above using a rather extensive config like:

  - type: custom:history-explorer-card
    header: 3 Fase totaal
    cardName:  3-Fase-totaal
    uiLayout:
      toolbar: hide
      selector: hide
    lineMode: stepped
    graphs:
      - type: line
        entities:
          - entity: sensor.calculated_totaal_l1_power
          - entity: sensor.calculated_totaal_l2_power
          - entity: sensor.calculated_totaal_l3_power
# globally used in more-info panels
    infoPanel:
      lineMode: stepped

to result in

so that is getting close. Though, the ‘hide’ would be better set to ‘none’. and actually not use that space either

I don’t get the problem. Do you use cardName attribute as needed for different graphs?

The infoPanel should only be added to a random defined graph or a seperate one to define the infoPanel attributes. Here it does not anything with the existing cards.

I only defined it once in test panel. But if I navigate to another dashboard and back, after some time, it is not taken into account anymore. Nowhere. Only if I disable and enable again.

Yes. Standard history with entity as entity_id. Supergreat would be, if it is not replacing the local stored current entity list of history, but only appending the new one. Same as if you would go to history, see e.g. the 5 entities from last time and add another one. Then you have 6. But this is only a dream and most probably not possible.

Great! :slight_smile:

Another question. Is there (here in more info) or in general to disable the grouping in the view, e.g. to have another option in the drop down instead of only 10m, hourly, daily, monthly? It seems that for more-info it is default for increasing sensors, but sometimes, the increasing line is helpfull as well.

No I didnt before, and as I explained above, added that to the individual card now yes. Guess I didnt expect we need to actually set that explicitly. Will do on the panel view too, so thats always ok.
Maybe Alex can make it so the card always gets an individual ‘unique_id’

Understood. As it stands, that is per dashboard?
Honestly, I would find it more elegant, if that could be set as a true option in some Lovelace config somewhere, and not have it attached to a random card. Might get buried that way, and makes it harder to find when editing those options is required in the future