Hi @RomRider, I wonder if it’s possible what I’m trying to do. I have a template configuration setup (which works great). Now I want to move over popup-cards using browser-mod (instead of global settings, inside each button through call-service). So I have all entities (future and past) use the popup card (in combination with auto-entities and grid card).
The problem I’m facing now is that I need the template to also fill in the popup part the of code with the same entity. I also use decluttering card for other stuff, which has the option to use [[entity]], this works great with nested cards. I miss this function with the template option of button-card.
This is the hold_action part the the configuration template which has the nested cards.
I tried using this.entity_id but that doesn’t work (I think this is not a core feature, but something of auto-entities). Is it at all possible to use nested cards inside a configuration template and passon the same entity? The pop-up does open, but it’s empty. I think because it can’t find an entity.
Edit: for the time being I tried this using decluttering-card and made button-card templates as variables within decluttering card. Works great (also with auto-entities and grid card)
I created a template file that loads the custom templates (many copied from examples above). I did a config check and no errors. When I point to the template, no matter which one, I get for example; Button-card template ‘standard’ is missing! Not sure what to look for. I have a spit config, and load the templates via the package documentation.
Example of the start of the yaml file.
Example of from others that are helping me understand, but I am missing something (still). Does each button card template need to be in a sperate file?
I am trying to add a link (to navigate back to the main view) to a custom field that is just an icon. It already looks exactly how I want it, but I can’t figure out how to add the link.
You can’t trigger an action from a custom field, you’ll have to embed a card in your custom field with the action on it (it can be a button-card) or assign the action to the main button-card.
I tried that too, but then I had to define the color twice, so that you can’t see the embedded card. Is there a way to make the embedded card transparent? Would make the templates easier.
You are not using button-card but the default button from home-assistant. This thread is about the custom button-card from here. So you have to install the custom-card first.
Then once installed and once your type: button changed to type: custom:button-card:
More round
styles:
card:
- border-radius: 25px # change the number here
I understood the circle. I didn’t understand how to make it that small.
Is what I am trying to replace. When they changed the naming of the OS / supervisor, etc it no longer fits in the badge. I used this as a glance to see if I needed to apply an update.
Please allow me to reinterate on this, because I had updated the post after we last spoke.
using the state_display: is working fine now, but I had to ditch most of my more complex state: configurations, because state_display: seems to not work in those?
Is it correct we can only use state_display: in the main button config section, and not in the state: section eg using the example I gave with my custom_field stateDisplay: ?
If the latter, would it be possible, and hence an accepted FR to make state_display: available in the state: field to make it work with operators?
I discovered an issue in the interplay of the button-card with the light card when working with a dimmer control. Maybe I’m just missing something obvious and you guys can help?
Coming from the end, the goal is to have a dimmer button that allows simple on/off switching on a tap, but where the button has a “backside” where the brightness can be controlled. This is working in principle by combining a state-switch card with two button-cards, one for each side. The backside button-card embeds a light card to get the nice dimmer control.
It all works as you can see from the animation, but what doesn’t work is the brightness setting of the light card once it is embedded inside a custom_field of the button-card. The point where you grab the control doesn’t realize when you release the mouse button or lift the finger. Consequently, it keeps moving even if you move the mouse away and the brightness change doesn’t register.
In the animation I have a pure light button on the same entity on the right that shows correct behaviour. I have also stripped down the whole construct of flipping and templating to just have a simple button-card, but that shows the same behaviour:
So. All of a sudden the space between 2 of some buttons has become smaller than before… I have been rewriting my templates, and did fiddle with card: padding: 5px here and there, but thought this was only the internal padding on the card?
What other parameter sets the space between 2 cards?
I am stumped, and don’t have a real clue what I did wrong this time…
please give me a hint…
found it… and this might be something to have a look at. Of course it was a user error:
config_title:
templates: styles_card
should be:
config_title:
template: styles_card
shouldn’t this error out? a typo like templates: in the main config of a card?
I still don’t understand why this would break up the spacing between cards, (and coloring of the icons in the button at hand), unless this would break anything after the erroneous templates: field?