Sorry I know you are busy @Ildar_Gabdullin but I just want to know if have I hit a dead end with this redraw thing now as I short of reading the code I donât know where to go with it, and no other card seems to claim to do it so it rather kills the project Iâm doing if I canât solve this. The only other option is to reload the whole dashboard every minute and that will look awful.
Chris, I am leaving tomorrow for my next shift, so rather limited with timeâŚ
Letâs continue this later after a couple of weeks.
I will give you a ready example of a graph card with a dynamic title then.
Please ping me then.
No worries, will do, thank you! I actually already have it in Jinja so thatâs quite quick to do. Iâm not sure how that will hide the chart dynamically when the data becomes zero using CSS but Iâll have a play with this all and see if it can have templated styles or something (the main purpose of what Iâm doing, the heading is just me being lazy)
I have also just discovered that apex charts has an update interval configuration item (I knew the main apexcharts.js library had an update method but as itâs wrapped up in a card I canât run it), but I suspect this just redraws the data bars on the chart and doesnât redraw the card/chart itself (and thus doesnât reevaluate the css style applied in the card config)
But that might provide me with a workaround if I am wrong on how I think it works.
Interesting, does it mean that the card updates itself not on every entityâs change - but periodically? (I mean the graph itself, not the scale which is supposed to be âshifted leftâ)
As for the âhide dynamicallyâ part - do you need to hide the whole card (with a title) or the graph only? Alternatively you may want to show smth different instead of the graph card.
And also discussing card-mod seems to be off-topic here.
In general:
Yes that does apparently update content periodically. Itâs supposed to update when the entity updates but itâs not, same as CTC isnât. But this seems to force a refresh at a time
I want the title and the graph to disappear. Iâm using card mod inside apex chart card as the apex chart card doesnât have its own style configuration option so if you want to play with css you use that (it has hundreds of styling configurations but nowhere can you set css display to none, itâs all line colours and stuff)
Update in case you see it / to save you testing. After a couple of days it just started refreshing, and hiding/unhiding as it is supposed to. I will check it properly over this week (I need the rain to start and stop a few times!) but my suspicion is that I have been fighting browser cache issues. I usually dev in private browsing to avoid these issues but just realised that I havenât been recently, my tabs are accidentally normal tabs.
I just noticed today that it had started working as expected (I think) so fingers crossed I have resolved the no-redraw problems I had!
when will I learn that complex dashboards in Lovelace must have browser cache clear before bug hunting