[Deprecated] Interactive history explorer custom card

Well, to be realistic, Blink and Webkit are the only engines that really matter on mobile, because they cover like 95%+ of all users. The rest is a small pool of niche engines mostly around Gecko/Firefox. These have a significant amount of compatibility problems with modern Web technology. And since this stuff is done in my free time, I have to manage resources where it makes most sense.

What browser are you using ? Try to change its user agent, so it presents itself as something Chromium based.

Hello,

Chrome, works
Opera, works
Firefox, don’t works
Home Assistant Android App don’t works
Fully Kiosk, don’t works
All others designed to kiosk (I tried all I found on play store) don’t works

OK I will try to change user agent

Thanks.

Fully Kiosk is based on Blink (Webview) and works fine (I just tested it). You need to make sure to select a user agent from a mobile browser. For example, use the ‘Chrome 85 on Android’ preset that comes with Fully. Do not select a desktop browser user agent.

Firefox on mobile will never be officially supported. It may or may not work. They have so many bugs and compliance issues with modern web standards, it’s close to impossible to keep track and work around all that.

Thanks.

With “Chrome 85 on Android” user agent Fully Kiosk works nicely

Additional question, is it possible to add basic math operation (+ - / *) ? so it’s possible to draw for example : sensor.energy / (sensor.inside_temp - sensor.outside_temp)

Now I do this with new sensor and templates but be able to do this at analyzing time should be more flexible.

You can do arbitrarily complex operations on graphs by running the data through your own JS code (see process settings in the readme). But you can only do this on the current graph data. You can’t access other sensors. That would make the DB fetching and caching logic massively more complex. It’s not something that is planned and I don’t think it is within the scope of this card. Templates are much better suited for this, there’s no real point in reinventing the wheel.

Hello,

Sure template do the job but they must be in place before data recording.

My background is from industry automation with software like “IBA PDA” (https://www.iba-ag.com/) and I try to use home assistant as a data recording and analysing software for all my energy related data in my home…

By the way, for recording filtering to avoid record redundant data that fill GB in the database I use Node Red. Didn’t found better way Lowpass filter "resets" on restart

If someone have a better way.

Anycase thanks for your History Explorer. It’s the best (and only usable way) to analyze recorded data.

Hello, really a nice work. I’m thinking about switching from apex card to yours. One thing i am missing is the actual value of the sensor (in numbers), is there an option to show this (sorry if i missed it reading the docs). For example this is how it looks in the apex card now:

image

1 Like

Hello,

Is it possible to draw attributes of an entity? Like the current_temperature of an climate entity.

Thanks.

No. See above or here.

=> Define a template sensor and use this one instead.

back to normal days, I confess I notice something that hadn’t caught my eye before:
on an energy sensor the state reflects tot total summed energy consumption, and in core HA, the history graph shows that too:

History-explorer shows the periods of consumption, and the amount, for those periods (which certainly has its added value compared to the core HA chart), but it loses the total in the axes. Sure, it has the total state still in view, but, the graph is a bit confusing now I notice it.

can we somehow set an option in the config, to show the blocked totals (maybe even with a popup for that period)?

You should be able to force a different graph mode (line graphs in this case) for this sensor or for all energy sensors using entityOptions. But then I just realized that this option was not yet implemented for the info panel override. Stupid oversight, just a missing line of code :confused: Gonna add this to the next release then.

2 Likes

I’m a little on the fence on this. I can see the value behind showing the current entity state in the card, but I’m not entirely convinced that this is really what this card is / should be about. In the end, this is the history explorer, not the current value explorer :wink: I mean, don’t get me wrong, it’s an interesting idea and would not be complicated to add. It’s just that I never really intended this card to replace dashboard graphing cards like the mini graph card et al. I don’t mind people using it that way, but be aware that there will never be a plethora of customization options like minigraph, Apex, etc have. This card is first and foremost a technical tool.

So tldr : if I add this (feel free to file a feature request), there won’t be any customization options like the font, placement of the value, etc. It would just appear behind the label.

Is there the rule described when the card is using timeline and when line charts?

I have e.g. one sensor with state_class: measurement which is displayed as line chart in standard history-graph

image

but as timeline-bar in history explorer card.

image

Is it if a uom is available or not? So if if none is defined from the integration, but I want to see line chart in infoPanel nevertheless, then I can still achieves this with a switch in the yaml or only in manipulating the sensor?

Yup.

Same problem as Marius above. You can override the auto selection of the graph type for entities, domains or device classes with the type setting. But that setting is currently not implemented on the more info override panel (it does work for the normal card though). Should be added in the next release.

1 Like

Ah, OK. Thanks. Will wait for this. :+1:

This should work?

entityOptions:
  measurement:
    type: line
    lineMode: lines

As it is not working here (for card and dynamically added entity) I wonder, where my did something wrong. Or is it only working for device_class and not for state_class as in the example above? Overwrite via entity is working.

BTW Is there any sensor with state_class measurement, where a timeline is the better choice than a line chart, even without uom and without device_class?

No, only for device classes (or entities or domains), not for state classes.

Probably not. It would make sense to auto select line charts for sensors using this state class.

1 Like

while you are at it…

what about a small enhancement here:

when clicking the down arrow we get:

but the arrow remains down…

would it be feasible to do like template-entity-row, and change the arrow to up on an open fold?

Seems silly (yep, me), but I had been clicking about, and found no way to not interact with the onions and make them disappear again, (even navigated away from the view to come back with a clean card), until I realized I had to click the down button again…
ofc, again, silly me, but changing that arrow does make it just that bit more obvious :wink:

Just what i have been looking for, thank you

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