Since a few releases (I don’t know when exactly) lovelace started only loading styles required for the currently displayed things. This broke a card of mine, where I use paper-dropdown-menu html elements.
The issue is, it seems to not load some css required for this element. If I refresh the page, the elements are just shown as a list, unstyled:
Once I navigate to a page, where this html element is used by home assistant itself (or add a native card which contains a dropdown) the necessary styles are loaded and it looks as it should:
How can I tell Home Assistant to load the styles required for this component?
The source code can be found at https://github.com/chaptergy/lightalarm-card where the latest release still uses ha-paper-dropdown-menu in the card and paper-dropdown-menu in the config editor, but they behave identically.
I can also confirm this broke in 0.115. It looks like anything derived from the custom-cards/boilerplate suffers this fate.
The really weird thing for me is if I click on my user profile and then go back to the config visual editor it then looks correct (but this doesn’t last).
Yep, mine is derived from boilerplate as well.
My workaround is to just open a light more-info. That “fixes” the issue until next reload.
I’m far from a TS specialist. I guess some “import @polymer/paper-dropdown-menu” disappeared from the main webui, and I have no clue on how to do the equivalent in a boilerplate-derived custom component.
We will be discussing soon how to create a method so that Custom Cards can import HA Core Frontend Elements. This will allow any Custom Card Developer to use the current elements that Core Frontend card use.
Is there any way to get things working again while waiting on the release? I downgraded to 0.115.2 but the custom-cards are not working, even after restarting Home-Assistant
[Update]
Grmpf … was an browser cache problem
[/Update]