I have a dashboard running on a screen in my kitchen. I use the kiosk-mode add-on to hide the header and sidebar: GitHub - maykar/kiosk-mode: š Hides the Home Assistant header and/or sidebar
I want to be able to make changes on my computer, and then have these changes automatically updated on the kitchen dashboard. At the moment, I need to VNC into the Raspberry Pi and then press Ctrl+R to reload the page.
It shows this message:
The Lovelace UI configuration for this dashboard was updated. Refresh to see changes?
Is there any way I can get it to automatically click the āREFRESHā button? Or even skip this popup and just reload the window? Is that a setting in Home Assistant? I think I would like that as the default anyway.
Otherwise it might be nice to have this as an option in the view settings, or as a query parameter.
I briefly tried to include my own JavaScript code in the page so that I could detect the presence of this message and refresh the page, but I couldnāt figure out an easy way to do this either. I found this lovelace-html-card add-on, but it crashes with an error:
Iām surprised that it seems so hard to get some custom JS and HTML on the page, since it seems like a lot of Home Assistant users are programmers.
I just got the Home-Assistant-Lovelace-HTML-Jinja2-Template-card add-on working:
But Iām just really confused why none of my JavaScript is running inside <script>
tags:
Canāt get any alerts to fire and console.log
or document.write
arenāt working. Iām a bit new to the Shadow DOM and shadow roots, so I donāt really understand how that works.