[Deprecated] Interactive history explorer custom card

Hey Alex,

your card has just become more relevant than before, with the new changes in the core History panel…

being able to select only from recorded entities, and those being persistent between view changes and even restarts is a huge plus indeed.

as I suggested in improving the HA panel, I figured it might be a nice touch for you card too:

being able to select entities by type/integration. Would that be something you’d consider adding?

usecase: check the person entities, and instead of having to select all persons individually, simply select Person from a dropdown. etc etc

Glad to write a FR if you’d consider ofc.
thanks!

1 Like

Right now the card does not support long term statistics yet. It’s on the backlog.

I mean on the backend side, this would be trivial. As so often, it’s all about the UI. I really want to keep the cards UI minimal and functional, not become something like this UX monstrosity that is the new history panel. What would you suggest on how to integrate this feature into the UI without adding new dropdowns etc ? I could think of simply using wildcards in the current entity selector (like person.* and then click add), but this might be too technical for some users and it’s not discoverable.

Yeah, wildcards would be cool. Though I admit not very user friendly probably.

I fear there would be no way other than allowing a drop down with the available domains in the system.

Maybe those could even be listed in the current drop down as predefined options?

“Type here to search for an entity or domain to add”

Btw currently I see this, and it seems a bit scrambled

As far as I see it, adding entire domains is a niche feature. I could see it being useful for things like the person domain, but imagine adding everything from the sensor domain. Pretty messy. Adding areas could be useful, but do people even use areas in HA ? I can certainly add the wildcard option for fully scoped entity names. That wouldn’t be limited to domains, but to anything within the entity name (things like binary_sensor.pir* would add all binary sensors starting with pir).

This feature is a double edged sword though. Imagine someone adding every entity by simply typing * into the field. Then he’d need to click through every single graph close button to get rid of them. I would have to add a clear everything option too.

Yeah that happens if there’s not enough horizontal space and the browser tries to overflow in a ‘smart’ way… Putting the entity selector below the graphs usually helps to clean that up a bit, but might be less convenient for you. I should probably add code to explicitly reflow the html if horizontal space is tight rather than relying on css.

New V1.0.23 version is available. I haven’t yet updated the readme, but here’s a short rundown of the new features.

  • The scrambled toolbars @Mariusthvdb was seeing (and probably many others too) was fixed. I rewrote the html reflow code myself rather than relying on css. Results should now look like this on small screens:

  • Wildcards are now supported in the entity selector entry field. Right now, that means the * character.
    Examples:
    person.* - Adds all entities from the person domain
    *door* - Adds all entities that contain the term ‘door’ in the name, regardless of domain
    binary_sensor.*door* - Adds all entities that contain the term ‘door’ in the name, but only from the binary_sensor domain
    * - Adds all entities. Everything. Careful with that :slight_smile:

  • There’s a new option in the selector dropdown menu to remove all dynamically added graphs in one go and start over. In case you ‘accidentally’ typed * into the entity selector field :slight_smile:
    image

  • You can now customize the height of your line graphs. Default value is 250.
    lineGraphHeight: 100

  • Tooltips on timelines can now optionally show the duration of a state:
    tooltipShowDuration: true
    image

The new wildcard option will probably need some serious testing, as I can imagine lots of corner cases. Let me know if something behaves not as expected with it.

6 Likes

nice! wildcards working nicely indeed!

Is it correct we see only 1 ‘x’ next to the graphs? ive just added person.* first and after that binary_sensor.*_sensor_motion, but when I want to revert the latter, I have to revert all?

If that is correct, would it be possible to add an x for each additional search box addition, so we can de_select likewise?

Command-z

Yup that’s how things always worked with auto-aggregated entities (ie. entities that use the same underlying graph), since the close button closes graphs, not entities. Not really ideal, but it’s again a UI thing. Technically the card could remove any entity out of any graph. But adding a ‘x’ button behind every entity would be overwhelming visually. So right now, that’s the compromise.

An edit mode has been on my list for a while now, where you could move around stuff, remove or merge individual entities, etc. But free time is a valuable and scarce resource these days (PR’s for this feature are welcome) :slight_smile:

Lol yeah, an undo would be useful too I guess :wink: And interestingly, it would be a lot easier and faster to implement, because there’s no UI around it.

Great update. Thank a lot.

BTW Is there an option to set the width of the Label column. Sometimes it is too slim, so I cannot distinguish directly between different entities.

image

Yes there is:

labelAreaWidth: 100

Default value is 65. It’s in the readme under Changing the UI layout :slight_smile:

omg. Read the documentation since beginning most probably hundreds of times and missed it. Thank for pointing towards this.

It is not accepting % values as well, is it? Would be great to have more balance in big and small devices.

Wow, you are just fantastic, I so appreciate this card as I use it for my Bayesian sensors. I use it it help diagnose what caused the room ( or the house :slight_smile: ) to shut down unexpectedly

Currently working on an AppDamon library to generate the YAML automatically for each room/person I monitor and for which I need your most excellent history-explorer-card

Thank you so much

Is there a working exampe?
My graphs are not shown.

Here is what i try:

type: custom:history-explorer-card
header: Living Room Ambient
defaultTimeRange: 24h
graphs:
  - type: history-graph
    entities:
      - entity: sensor.wandthermostat_wz_temperature

But the graph is empty.

Yes. Here: GitHub - alexarch21/history-explorer-card: A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.

1 Like

Really liking the functionality of this card!

Question - I’ve added the Venstar thermostat integration and with HA’s built-in history, it displays the thermostat’s cooling cycles. I’m not able to find this entity in the drop down list of the History Explorer Card.

Is there anything one can do to enable this functionality?

Thanks!

As far as I know, some (most ?) thermostat integrations will store heating or cooling cycle data as an entity attribute. The history explorer card does not support the visualization of attributes and likely never will, as this would have a very serious impact on performance due to the way HA stores and queries attributes in the database.

However, you could simply create a template sensor that copies the thermostat h/c cycle attribute into a separate entity. This could then be visualized by the card at full performance.

1 Like

I’ll give that a go Alex, many thanks for the reply!

Thank you very much for this wonderful card!

Could you improve it by “localizing” the text of the selection box to the user HA language? I’d like to read “Buscar la entidad a visualizar” instead “Type to search for an entity to add” :wink:

I haven’t really considered localizing this card yet. But it sure sounds like something that should be done, especially now that more people are using it. There’s not much text in there anyway. I’ll need some help from the community with this though ! I can do French and German, but any other language will have to be contributed. I can create a list of strings that appear in the card.

1 Like

Thank you

I can help you with SPANISH , of course.

Please, send me the list of strings to translate

Best regards

1 Like