you need to return the entity in the popup otherwise it will not work. Is your popup in the same config as your card or are you using templates outside the card config? Something like this will work.
yeah, good question. I always use them. the thing is, if you do, you are 100% certain the interpreter does what you instruct it to do, which in this case is see the end of that specific instruction/variable/template etc etc Those are called ‘statements’.
and this would be the formal rule:
A semicolon is not necessary after a statement if it is written on its own line. But if more than one statement on a line is desired, then they must be separated by semicolons.
Interesting. The popup contains several cards with different entities, so not sure how this would work. So in that example, it passes the state object from the calling function? nice.
If for whatever reason the local state object is not getting loaded, I wonder if I could force it to load somehow? will play with that.
Here is a fuller snippet. The popup typically contains several button-cards (and other cards) that follow.
Open js-file in VSC (/www/community/button-card/button-card.js).
Find the only occurrence of “component.${r}.state._.${i.state}”.
Replace state._
with entity_component._.state
Again, this is a temporarily fix. I realized that in 2023.4 localization keys were changed; so I searched a code for patterns and found these “xxxx.state._.xxxxx” old keys in button-card, multiple-entity-row, slider-entity-row, config-template-card, history-explorer-card (means - all these cards have or may have issues).
Probably a REAL fix should be more complex)))
Anyway, I decided to create a PR with this small change - to urge a developer(s) to dig this issue in this card with a more attention.
Update: one more thing should be changed to support different device_classes:
replace
Cannot check right now. Theses changes need to be checked a lot. Frankly speaking, I use this card in 2 places - about 20 cards of one template, 12 cards of another template, and I’m both cases “state_display” is used …
I have what might be a stupid question, but I have searched and have been unable to find my answer.
I am learning yaml and becoming more comfortable with it, but when making a dashboard, I find the GUI easier to manage all of my coding. I get lost when it is all coded in yaml in one big file. Or even split across multiple easier to manage files.
I have done some button-card features and card-mod for a couple of GUI elements, but am working on a complete custom dashboard. I have many button-card templates and would like to use those in a GUI dashboard. I tried adding the “button-card-templates: !include….” but the GUI did not like it.
I know I can code each button element individually and add all of my modifications, but it is so much easier to use a template and make a change once as I continue to refine my setup.
So is there a way to reference button card templates that I have saved in my config while using the GUI editor to build my dashboard? Any help would be greatly appreciated. Thanks in advance.
Lock icon shows above all layers and dialogs
In core-2023.5.2 something changed in frontend, and now card Lock icon (lock: enabled: true) displays above all layers and windows.
Yes, I also noticed z-index issues with browser_mod if you have sticky cards. The browser_mod popup now renders behind the sticky card, which breaks the entire popup since you can’t access parts of the UI.
Too many frontend changes forced me to revert back to 2023.4 for now. I hope they’re done with frontend changes like this for a long time. Ever since 2023.1 I’ve been faced with breaking changes after each update
Have searched everywhere, but couldn’t find a solution for wrapping long text in the card by using card_mod, as it’s possible in other custom cards. Maybe one of the card_mod gurus can help?