On a tap_action you are showing a browser-mod popup.
This popup is a Glance card filled by with a custom:button-card.
And you got some issues.
Was it all your code or taken from somewhere?
Do you know that testing some code is usually done like “part by part”, not in a complex combination from a beginning?
Saying this because you cannot place custom:button-card inside a Glance card. It is unsupported. You could have noticed it - in case of testing this “auto-entities” part w/o all that “sandwich”.
If you need to place button-card into a grid-like structure - consider a Grid card.
The code was rewritten from code several code examples googling over a week trying anything. I currently have another button setup just the same and it is working fine with the glance card. I have not seen anything documented that the glance card cannot be used with custom:button. In fact I replaced the glance card with a grid and it generates an error which flashes by so quickly I cannot tell what is. No log file has an error for it.
I’ve been coding for many years yet YAML is new to me. You seem to come across like I have never done any coding. You do not know me so in my opinion please don’t talk down like you seem to doing. No disrespect to you insinuated.
I tested the code as a single card before trying and it works fine:
type: custom:button-card
color_type: card
aspect_ratio: null
entity: fan.family_room_fan
show_entity_picture: true
name: Family Room Fan
tap_action:
action: toggle
state:
- value: 'on'
color: green
styles:
icon:
- animation:
- rotating 1s linear infinite
Below is the first test “part in part” using auto-entities and then adding it in a vertical stack which runs fine. The code section I am having issues is with the animation and color. The card works except for any new custom:button options.
No, I never meant that you had never coded.
And ofc I did not mean that someone who never coded is a wrong person.
I only meant what I wrote explicitly: “Do you know that testing some code is usually done like “part by part”, not in a complex combination from a beginning?”
And I see that you still trying to debug a code after mixing different parts together, not “part by part”.
This is not about “programming in yaml”, this is SAME for ANY language.
“Part by part” - in this particular case is:
– first create a card which you want to be shown in a popup;
– test this card in the simplest configuration; make it more complex step by step;
– then test the main card n the same step-by-step way;
– then add the 1st card into a popup and check if it is still properly shown inside a popup.
As for the Glance card.
In fact you can place “custom:button-card” inside Glance card:
Ok, I figured it out. I had two domains defined in the auto-entities for switches. Domain switches had a card option defined whereas I did not define one for lights.