dwainscheeren / dwains-lovelace-dashboard

An fully auto generating Home Assistant UI dashboard for desktop, tablet and mobile by Dwains for desktop, tablet, mobile
Other
1.79k stars 189 forks source link

Issue with theme displaying #271

Closed WMunschau closed 3 years ago

WMunschau commented 3 years ago

I have the problem that the displaying is not loaded correctly. However, when I reload the theme, it is displayed normally again. It doesn't matter if the theme in HA is set to Auto, Light or Dark. The same problem exists on mobile devices.

Bevor reload the theme configuration: Bevor_reload

After reload the theme configuration: After_reload

Gerrni commented 3 years ago

Same here on Android devices and desktop with chrome.

StefanDorschu commented 3 years ago

Same problem here (iOS/MacOs / app)

B-Hartley commented 3 years ago

Yes, I have this issue too, never thought that much about it. The first time I access the dashboard it doesn't display correctly, but after a refresh it does.

StefanDorschu commented 3 years ago

But it should be that way. :)

dwainscheeren commented 3 years ago

It's a strange bug I can't replicate at my side. Mostly its coming from a slow loading of the dashboard (it depends on some milliseconds) and then the theme is loaded too late after the check.

dwainscheeren commented 3 years ago

You can copy the themefiles from my custom_component to your main /themes files folder which is defined in your configuration.yaml under frontend: then set Dwains ... as default theme for your whole HA that fixes the issue :)

StefanDorschu commented 3 years ago

I give it a try :)

Gerrni commented 3 years ago

Your dashboard is default. I think when you switch between some dashboards (to test something in original Lovelace dashboard) and use your back function from your smartphone.

LooSik commented 3 years ago

Same issue here on android app.

Gerrni commented 3 years ago

I will try this tomorrow.

Screenshot_2021-04-20-00-14-28-89.jpg

https://github.com/dwainscheeren/dwains-dashboard-addons/tree/master/lovelace_theme

and set them as theme for your whole HA. Then its should be fixed

mmornati commented 3 years ago

I will try this tomorrow.

Screenshot_2021-04-20-00-14-28-89.jpg

https://github.com/dwainscheeren/dwains-dashboard-addons/tree/master/lovelace_theme

and set them as theme for your whole HA. Then its should be fixed

And? Is that fixed in the end? I've the same problem in all my devices and it occurred with an update (not sure ha or dashboard) and since that moment it never worked good.

mmornati commented 3 years ago

FYI. Just tested and it is working in this way. Changing the theme to the dwains theme allows showing the dashboard correctly all the time. 🎉

mmornati commented 3 years ago

Checking a bit further I discovered that some hack front components, mandatory I think in a previous version, are now integrated in the Dwains dashboard itself. This was producing lot of console log error I didn't notice before related to the fact JS components were already loaded on the page. For the test I made so far, with the default theme and removing the double front components, all seems work correctly. So maybe, if you have this kind of problem just check in your browser console log if components are not loaded twice within the page and just remove the "external hack front integration".

Is that normal that Dwains is coming with pre-packaged external components @dwainscheeren ?

dwainscheeren commented 3 years ago

Yes button-card and light entity card are pre-packaged so you dont need to add them yourself to your resources.

mmornati commented 3 years ago

Yes button-card and light entity card are pre-packaged so you don't need to add them yourself to your resources.

Thanks. On my side, it seems the root cause of the display problem. No idea why I installed them externally... is this the configuration of Dwains since the beginning @dwainscheeren or before we needed to install them manually?

dwainscheeren commented 3 years ago

Since 2.0 they are loaded automagicly :)

mmornati commented 3 years ago

That is! I think I missed the migration guide 🤣

mmornati commented 3 years ago

2 days after the fix removing external duplicated modules and all is working good. Personally I think we can close this issue... What about you @WMunschau ?

WMunschau commented 3 years ago

You're right. The issue can be closed.