history-explorer-card
history-explorer-card copied to clipboard
Fix history in more-info dialogs
This pull request fixes the history in more-info dialogs replacing the properties of the more-info dialogs that were replaced in Home Assistant 2025.5.0.
Incredible. Genius. It is working again. Can cry for joy.
For all, who don't want to wait for merging the PR, etc. I have just replaced the relevant parts in the JS. See attached the file, which is working here.
- Unzip attrached zip
- Replace the history-explorer-card.js in www\community\history-explorer-card folder
- Either gz that in the gz file or just rename the history-explorer-card.js.gz to history-explorer-card.js.gz.old
- Reload js in browser via hard reload or developer tools without cache or ...
For all, who don't want to wait for merging the PR, etc. I have just replaced the relevant parts in the JS
That file is already included in the pull request. It is the second file in the list of changes (history-explorer-card.js). 🙂
So it seems that this is a confirmation that the fix is working, I'll open the PR.
Hm... am i the only one where it doesn't work? Tried everything: replacing "__", tried above zipped file, hard reloaded (via F12), restarted HA... i still have only built-in history when i click on any card...
Hm... am i the only one where it doesn't work? Tried everything: replacing "__", tried above zipped file, hard reloaded (via F12), restarted HA... i still have only built-in history when i click on any card...
Did you rename/delete the gz file as well? See point 3? And really replace the js with my file?
And try to reload e.g. via
+Reload?
Yes, i renamed original file, copied your version and hard reloaded (F12, then right-click and "empty cache and hard reload".)
We are talking about the same thing? I'm testing history when i click on entity, before that i chose "enable history info panel": (pic shows panel already enabled):
hard reload
It is not the same loading a browser bypassing the cache than clearing the cache. If you want to be sure, open your Home Assistant instance in an incognito window, if you don't get errors there then you are being hit by cache issues and you know that you need to clean it. (you can try to disable cache in Network tab and reload several times)
i still have only built-in history when i click on any card...
By the way, this PR is to solve errors when you open dialogs after selecting the option to replace the history panel (the history is replaced completely but there are errors in the console so you get an empty history). If your history is not replaced at all then that is a separate issue not related to this one.
By the way, this PR is to solve errors when you open dialogs after selecting the option to replace the history panel (the history is replaced completely but there are errors in the console so you get an empty history).
Yes, that's what it's happening. I owe you an apology about that - i didn't even look if history graph shows or not, i just looked at top line (i looked if + - and day will be shown or not) and when it was old interface i didn't even look forward... but now that you mentioned - yes, graph is still not shown. As said, i did clear cache with F12 --> hard reload and clear cache. I also tried on 3 devices, edge, chrome... I also tried on android app, nothing...
So, for whatever reason this solution doesn't work for me... (BTW...your file still has 19 "__" hits .. is that ok? First solution was to replace those...)
Is the fix working for the mobile view too? I did the fix and it´s working fine in the desktop version (after clean the cache). But in the mobile version, after enable history explorer for all, i don´t see the nothing. I removed the cache for the site in the chrome app. Is there any step I missed?
This error shows in my developer tools when i load page with history panel enabled and click for more-info:
As said, i did clear cache with F12 --> hard reload and clear cache. I also tried on 3 devices, edge, chrome... I also tried on android app, nothing...
Make a simple test. Go to the network tab in developer tools, refresh your browser, search for history, right click on the first entry and open it in a new tab. Search for __ you should only get 2 instances.
So, for whatever reason this solution doesn't work for me... (BTW...your file still has 19 "__" hits .. is that ok? First solution was to replace those...)
I am not sure which file you are checking. This is the raw file in this pull request, if you search for __ you should get only two instances.
Is the fix working for the mobile view too? I did the fix and it´s working fine in the desktop version (after clean the cache). But in the mobile version, after enable history explorer for all, i don´t see the nothing. I removed the cache for the site in the chrome app. Is there any step I missed?
You need to clean cache also in the App, if not you will get a cached version of the plugin.
Follow the reccomendations given here.
Is the fix working for the mobile view too? I did the fix and it´s working fine in the desktop version (after clean the cache). But in the mobile version, after enable history explorer for all, i don´t see the nothing. I removed the cache for the site in the chrome app. Is there any step I missed?
You need to clean cache also in the App, if not you will get a cached version of the plugin.
Follow the reccomendations given here.
I´m not using the companion-app, it´s a chrome web app (shortcut from the web).
I´m not using the companion-app, it´s a chrome web app (shortcut from the web).
Then open the Home Assistant instance in an incognito window and check if it works there.
I managed it to work. What i did was:
- delete BOTH files in history's folder (js and js.gz)
- zipped new "history-explorer.js" file into "history-explorer.js-gz" with 7zip program
- copied BOTH files (new js and new js.gz) in history's folder
- hard refresh.... only NOW it works. So, is it imperative also to replace gz file, too, not only js one? I didn't quite understand your point 3 in instructions - i thought that i only need to rename OLD gz file. I did rename it into ...js.gz.old as suggested, but that wasn't enough.
oh, well... noob goodies... thank you very much for bothering with me!
regarding companion app: it works on iPad, since it has clear cache button. God only knows how to clear cache on Android, though.... i can't manage to work...
only NOW it works. So, is it imperative also to replace gz file, too, not only js one? I didn't quite understand your point 3 in instructions - i thought that i only need to rename OLD gz file. I did rename it into ...js.gz.old as suggested, but that wasn't enough.
That is weird, renaming should be enough. Normally I use backup.name.extension but that should not make a big difference. Anyway, good that you get it working 👍
regarding companion app: it works on iPad, since it has clear cache button. God only knows how to clear cache on Android, though.... i can't manage to work...
Check this link. I need to change it though because the changes to clear Android cache are already published.
It appears that companion works if i delete all browsing history in chrome (android). I opened HA from Chrome, then clicked on three dots in upper right corner, selected "clearing browsing data" (or similar, i'm translating from slovenian) and deleted all data. After that i've had to login again in chrome, of course. But from this point new history also work in companion app.
It appears that companion works if i delete all browsing history in chrome (android). I opened HA from Chrome, then clicked on three dots in upper right corner, selected "clearing browsing data" (or similar, i'm translating from slovenian) and deleted all data. After that i've had to login again in chrome, of course. But from this point new history also work in companion app.
This has been released already. The path in English is Sidebar settings > Companion app > Troubleshooting.
Jesus...i think it couldn't be more hidden as it is... Thanks a lot! Now that i know i hope i'll remember... And, of course, thanks A LOT for history-card repair!
@elchininet Thank you It's working in chrome and campanion app
thank you so much elchininet for this fix!!!
everyone looking for a quick and broad way to force all clients/platforms to update cache
edit dashboard and go into manage resource
find and edit the history-explorer-card line
just change the number after hacstag= to anything else.
This will mime the file has been changed and all the clients will automatically reload the file. You can do this from any client you are more convenient with and it will work.
@SpangleLabs Can you merge this PR pleas?
+1
Note to regenerate the .gz file on linux/unix:
gzip -fk history-explorer-car.js
-f to force overwrite of already existing .gz file -k to keep original uncompressed version