hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Solution for updating (re-rendering) the button-card

Open il77781 opened this issue 1 year ago • 0 comments

Hello! To be honest, I'm not sure which type of issue I should have chosen... In general, the problem is that if you use browser_mod.popup to open a button-card, which uses, for example, templates that change the state (for example, styles) of buttons when (again, for example) you press these buttons, nothing actually happens to the popup - when you press the buttons, its state in popup does not change... Yes, this topic has already been discussed, at least here - https://github.com/custom-cards/button-card/issues/397 and here - https://github.com/thomasloven/hass-browser_mod/issues/186... But, unfortunately, no solution, as far as I was able to find out through the search, was never found - the developers nodded at each other - and, unfortunately, everything stopped there... It should be noted that the problem with the lack of "re-rendering" is not observed for all types of cards... As far as I understand (please correct me if necessary), the problem is that when the popup is open and when clicking on the button-card buttons, which trigger certain events, in turn, affecting the values calculated by the templates, the popup itself has already been formed... And changes in the values calculated by the templates simply do not "reach" the popup... If this is the case, then maybe it is possible to add an additional service with the conditional name browser_mod.popup_re-render, which will "redraw" the current popup? If the statement from this comment - https://github.com/custom-cards/button-card/issues/397#issuecomment-724126534 is more likely and easier to implement, then maybe something can be done about it? In the event that a solution has already been found, and I just haven't found it, please direct me in the right direction...

il77781 avatar Oct 14 '24 11:10 il77781