[Under New Management] Interactive history explorer custom card

Thank you for the explanation, i totally understand your direction of sight.
I filed a feature request, if it isn’t much to do i would be really happy, if there are more important things to do i totally understand it.

Thanks Mike

Hello,

Something bad in my config or “showUnavailable: false” don’t works as entity option ?

cards:
  - type: custom:history-explorer-card
    showUnavailable: true
    entityOptions:
     sensor.heating_setpoint:
       showUnavailable: false

Thanks

It is a global option. It does not work per entity.

V1.0.43 is up !

  • This version introduces automatic refresh options. The card supports two settings, automatic refresh when one of the graphed entities change and user defined fixed refresh intervals. Both can be used individually or combined. The more info panel supports automatic refresh only (enabled by default). See the readme under Auto Refresh to see how these settings are managed.

  • An option to show the current entity state for line and bar graphs was added (@madface), see the readme under Showing current sensor values.

    image

  • The type option now works for more info panels (@Mariusthvdb)

  • Sensors with state_class set to measurement will now default to line graphs, even if they don’t have a unit of measure (@arganto)

  • And the dropdown menu arrow now flips when the menu is open :slight_smile:

5 Likes

Auto-Refresh. What great new option. Love it. And thx. for the other changes as well.

This whole one is so great and helpful. Excellent. :+1:

1 Like

Thx Alex, looking forward to all new features.

HACS doenst offer it yet though?

update

it showed minutes after I had posted. all good!


nice touch
:rocket:

HACS limited its update check frequency. In such cases, reload HACS or restart HA.

Hello. Please tell me how to make two readings of one sensor displayed on one graph. For example, temperature and humidity. In the configuration file, I wrote: combineSameUnits: true

Temperature and Humidity have different units, so combineSameUnits won’t combined them because, well, they have different units.

That is, the readings of one sensor cannot be combined?

Thanks for all theses improvements.

Is it possible to add wildcard characters in entityOptions entities names ?

For all measure lineMode: curves is best but for setpoints lineMode: stepped is best

I would like to declare something like:

sensor.setpoint_*
lineMode: stepped

For setpoints I only have a record when setpoint changes so not often so for setpoints showUnavailable: false is really required. If not I get no drawing at all most of the time.

But for measure it’s interesting to show periods of missing measurements so showUnavailable: true is best unfortunately it’s a global option not working as entityOptions.

I don’t know if it’s easy to do

Any case thank you for this history explorer. Grafana is overkill. Integrated curve are poor. Your is the best

No, but you can use the sensor device class (if your setpoints have a specific one).

You can use a process function to simulate showUnavailable: true for some entities or device classes or domains, even if it’s turned off globally. For example, to show gaps on all temperature sensors, but not on anything else:

showUnavailable: false    # turned off globally, interpolate over missing data by default
entityOptions:
  temperature:            # turn it on for temperature sensors, to show missing data as gaps
    process: '["unavailable", "unknown"].includes(state) ? "undefined" : state'

Unfortunately setpoints and measure have same device class.

It’s temperature sensors entity created from climate by template to be able to draw them with history explorer.

I think I’m still missing something.

My drop down in the more-info pop-up still has a white background.

But it works fine in the card itself.

here is my card config:

- type: custom:history-explorer-card
  skiplocale: true
  lineMode: stepped
  uiColors:
     gridlines: '#212121'
     labels: white #'#BAC0C6'
     buttons: '#2e2e2e'
     selector: '#2e2e2e'
  refresh:
    interval: 30
  showCurrentValues: true
  infoPanel:
    lineMode: stepped
    uimode: dark
    uiColors:
      gridlines: '#212121'
      labels: white
      buttons: '#2e2e2e'
      selector: '#2e2e2e'

But this is the result:

more-info popup:

history explorer card:

any ideas?

Did you make sure you run the latest version ? Browser caching can be problematic. Check the version on the console.

The dropdown background does not use any of the YAML config. It uses the --card-background-color CSS variable, normally provided by HA and/or by your theme. There have been so many wild breaking changes on the CSS vars over the last couple of versions, it might be related to that. Strange that it works for the card and not for the override though, since it uses the same var.

1 Like

That was the issue.

I had originally installed the plugin manually but then later installed it via HACS.

When I updated the HACS version I forgot to remove the older manually installed version so it was still there.

It was strange tho since I removed the reference to the resource in my lovelace resources file so I don’t know why it was “sticky” after that reference was removed. I thought it should have picked up the hacsfile version and not the other one once that was changed.

:man_shrugging:

anyway I’ve removed the older version and it seems to be working now.

Thanks again for this plugin and support.

If you left the manually added resource in, in addition to the one created by HACS, then HA would essentially try to load two different versions of the card simultaneously. Since both have the same ID, one would overwrite the other. The one going through is probably random and depends on loading order. Anyway, good to know you solved it !

Wow, this looks amazing! Was looking for a more polished history graph.

QQ : everything works perfectly fine with most of my sensors / entities… but I have some smart Thermostats that have multiple “attributes” (unsure if it’s the right term). A single entity will return the set point, the current temp as well as if it’s heating or not.

This is what it looks like in the default UI :

How would I make that work with this custom card? When I add this entity, I get an empty graph…

Thanks!

At this time, the card doesn’t support attributes. The card does realtime streaming from the db and the very inefficient way attributes were stored in the db by the HA recorder component would create huge performance problems. You can get around this most of the time by using a template sensor mapping the attribute to a separate entity. But the case of thermostats is special and remains problematic due to its massive reliance on attributes (even if some people found some less than ideal workarounds). The fact that Frenck said years ago that attributes were on their way out anyway made this look like a non-issue. This phasing out never happened though.

Now, there have been improvements on the HA database efficiency lately, which is much appreciated. The main problem still remains (the API is unable to request attributes only for selected entities, it’s an all or nothing thing). But I have to run some tests to see if globally requesting attributes will still impact performance as badly as it used to. And then go from there.

Cool, thanks! Explains why I couldn’t find the way to add attributes!