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.76k stars 188 forks source link

Gauge cards - values not visible, only after reload #473

Open sven0110 opened 2 years ago

sven0110 commented 2 years ago

I‘ve a fresh installation of DD3 and runing HA in Docker ( core-2022.4.7 ).

If i reload DD3, start HA App (iOS) or switch between areas the Gauge Display no values. They show values if the value is updating or i reload the area. It doesn‘t matter of the values come from mqtt, hue sensors (temperatur) or other elements. 8A10D00C-719B-4EF6-827F-F36008AE2104 9BDB77B3-51B4-49BF-A6EF-B0299A6E4793 EBEA2CF7-8958-4295-A645-0E88AB9CCE1C

sven0110 commented 2 years ago

Hi!

I‘ve tested the Gauge Cards also with Safari and Firefox and get the same issue. The values of the cards are only visible if I reload the page or the value is changing in the next moment e.g. temperature or photovoltaic. If you need more infos please let me know. Thanks in advance and greetings, Sven

dwainscheeren commented 2 years ago

Seems like an issue with the integration from creator of that card

sven0110 commented 2 years ago

Ok…thanks for your reply but it‘s the out of the box HA Gauge card or is there another way to display the values like this?

Goodwillson commented 1 year ago

I am getting same issue with gauge graphs, is fix comming soon?

thab-schreck commented 1 year ago

Can also confirm the bug. What I found out is that changing any css property of the "value-text" in the svg also makes the value visible again.

thab-schreck commented 1 year ago

Can also confirm the bug. What I found out is that changing any css property of the "value-text" in the svg also makes the value visible again.

Also tested it in two other "normal" dashboards, and it's working like a charm there. So must be related to dwains dashboard in any way 🤔

Duke194 commented 1 year ago

I have played a little around with the gauge in dwains dashboard. Seems to be a problem with the SVG text. It is not placed in the right place when entering the area in which the gauge is placed. If you inspect the HTML tree, you will see that the viewBox is all 0. image

When the value gets updated, the viewBox value is corrected and the text is visible again. image

I have tested and confirmed that you can "fix" the issue by copying the correct placement over the viewBox property. This is just temporary, but confirms that this is the problem.

It's likely a lifecycle issue, I suspect when entering a new area all items are being loaded. At the point when the gauge is loaded it might not be rendered already and therefore the text gets the wrong placement and puts the text at 0. But that's just a guess, which I have not looked up in dwains code. It's just the place where I would start looking up the problem.

rubenrivera8 commented 11 months ago

Just following up on this hoping for a fix in future update release, as this bug is still present in v3.4.3.