[Under New Management] Interactive history explorer custom card

Given that it works fine in your other Browsers, I don’t think it is related to your amount of data.

Given that other Firefox Users don’t observe that (e.g. me :wink:, even every 240 datapoints per hour work fine) i would think it has to do with your particular Firefox Instance.

Have you tried it in incognito Mode?
Or tried downloading an independent (portable) Version of Firefox?

Perfect layout of different types of graphs !
Without empty lines between them. I would like to see such a setting in this card.

V1.0.48 post-holiday release is out ! Readme is not yet updated, I’ll do that when I find some time.

  • You can now scroll beyond the 1 year limit with long term statistics (up to 20 years back !). The data cache will grow automatically as needed, so this won’t use more resources if you don’t want to scroll back that far.

  • Y axis step size can now be manually set. As usual, this works for both manual YAML graphs and dynamically added graphs over entityOptions. The manual steps will often work together with manually defined ymin and ymax options, but they also work with automatic y axis scaling. Example:

graphs:
  - type: line
    options:
      ymin: 0
      ymax: 40
      ystepSize: 5
    entities:
      - entity: sensor.outdoor_temperature
  • Added more options for default time offsets: weeks (w), months (o) and time offsets can now ‘snap’ to the an hour (H), day (D) or month (O) boundary. Examples:
# show the current day, starting at midnight
defaultTimeRange: 1d
defaultTimeOffset: 1D

# show the current month by default
defaultTimeRange: 1o
defaultTimeOffset: 1O

# show the last 3 months, with the current month last
defaultTimeRange: 3o
defaultTimeOffset: 1O
  • Added Slovak and Russian translations

  • And some bugfixes and improvements around dark mode detection and timezones.

2 Likes

Hi,

First of all, love the history explorer card!! Great work. Just wonder if someone can help me. When I export history to a CSV it defaults to a max of 10 days. I’d like to export all the raw history, the image below shows the history explorer for a sensor, when I “Export as CSV”, the CSV only include 10 days not the 2 months as shown in the graph. Interesting if I “Export statistics as CSV” the export contains the full 2 months of statistics.

Because the 10 days are the only history available (every data point) and the rest behind the 10 days are the statistics (reduced data granularity withmin max mean).

You can set/increase the history days data in your recorder.

Soo uhm, V1.0.49 is out with a hotfix because I kinda introduced a stupid bug in V1.0.48 because I’m stupid and pushing releases at 4 oclock in the morning is usually not a good idea… :sweat_smile:

So please update or else… (your card will crash if you have automatic refresh enabled)… Sowwy :grin:

3 Likes

is this something you would recognize:

Unhandled Promise Rejection: ReferenceError: Can’t find variable: cacheSize
on reactive element?

using 1.0.49 btw

Nope, sorry, never seen something like that before. A bit more context would help though (when does that happen, yaml config, etc) :slight_smile:

Also make sure you really are on 1.0.49 (check the version info banner in the console).

Scherm­afbeelding 2023-09-12 om 14.11.56

happening on clicking an entity in the dashboard, which opens the more-info history-explored panel

It’s a plain entity in an entities card

entities:
  - type: custom:template-entity-row
    entity: sensor.netto_verbruik
    name: >
      Netto: {{'Levering' if states(config.entity)|int(default=0) < 0 else 'Verbruik'}}
    state: >
      {{states(config.entity)}} W
  - sensor.zp_actuele_opbrengst

happening on others too:

the UpdateMoreInfo is not related (I hope) its a logger from my custom_ui happening when the attributes dropdown is opened, so not interfering here I would think

Ah yeah I think I may have found it. The multi-year auto-grow cache I added in V1.0.48 seemed to have more side effects than originally anticipated. I just uploaded a new dev release onto the repo (it’s not on HACS yet). Could you try to install it manually and see if that fixes the problem ? If yes, I’m going to push it to HACS later tonight when I get home (I don’t have access to my HA dev instance from the office).

yes, can confirm that takes out the logging!

frontend is terribly sluggish though, but the error has gone.

It’s very unlikely that frontend speed has anything to do with this change.

btw, are yo manipulating SQL in anyway too?

2023-09-12 15:09:54.771 WARNING (MainThread) [homeassistant.components.http.security_filter] Filtered a request with a potential harmful query string: /magmi/web/ajax_pluginconf.php?file=../../../../../../../../../../../etc/passwd&plugintype=utilities&pluginclass=CustomSQLUtility
2023-09-12 15:09:54.801 WARNING (MainThread) [homeassistant.components.http.security_filter] Filtered a request with a potential harmful query string: /magmi/web/magmi.php?configstep=2&profile=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E

is something that just popped up, and Ive never seen before
the only known software in my system that has SQL written on it is the Add-on SQLite web, but it is not active. Figured you might be messing with the LTS here :wink:

Nope, no access to SQL (that wouldn’t even be possible on a frontend card).

Those queries look malicious btw.

cool.
there is another error directly tied to HE that I have been hunting around lately and I figured it had to do with my custom-ui:

Logger: frontend.js.latest.202309080
Source: components/system_log/__init__.py:269 
First occurred: 11:35:13 (11 occurrences) 
Last logged: 14:33:52

Uncaught error from Safari 16.6 on Mac OS 10.15.7 Script error. null @:0:0

Ive ruled that out (disabling the custom-ui resource does not take away the error), and now tried to disable the HE resource (the dev version now, but it also showed in the release) and yes, taking HE out takes out the error.

please have a look what might cause that?

No clue, sorry.

well, Ill open an issue in that case, because Ive just re-installed HE again and the error is back immediately when clicking the item for more-info

What error ? The original one ? Make sure you reinstalled the correct version. Check the console and make sure it says 1.0.50 dev.

You may not have correctly installed the dev version the first time around. This error does not appear everytime you open the more info. It depends on the state machine and may seem random.

ah, we cross posted, I just openend an issue in the repo.
No, the dev update is fine, Scherm­afbeelding 2023-09-12 om 16.15.28
and I am no longer seeing the original issue in the inspector

its the Frontend issue in the log coinciding with the resize observer in inspector

I don’t have write access to my github from the office, so I’ll reply here.

Ah it’s the resize observer one. Just ignore it, it’s normal. It was there from the very first HE card. It’s completely harmless, but would be a huge amount of work to remove (so not worth it basically).

As long as the cachesize error is gone, all good.

[Offtopic]
Just a quick offtopic note about your log warnings posted above. This here:
ajax_pluginconf.php?file=../../../../../../../../../../../etc/passwd&plugintype=utilities&pluginclass=CustomSQLUtility
Raises so many red flags, you’d end up in an entire forest of red flags… they’re trying to get your root credentials for your HA box. You should try dig a little deeper and see how this may or may not relate to the custom SQL thing you’re using.
[/offtopic]