To be clear, the ones I mentioned are just ones I made up for my own (the light-bright, etc are because I have 4 modes of light settings). You can use any colours or variables names you want, but yes, make sure that any variables you reference in your templates/buttons are included in any theme you want to use.
tried it without var at first, using the html code in the name_template directly, but it kept showing that html code on the button. Using the var does the trick, but probably because I didnt find the correct syntax.
@RomRider is the css code for word-wrap below not yet supported on your Button card? Ive tried various options and places in the config, but no change in output (no error either):
styles:
name:
- word-wrap: break-word
or maybe even:
styles:
card:
- word-wrap: break-word
would be really nice and cleaner to be able to set that in the config, and not have to use the name_template version. Please consider adding that, and overflow-wrap?
I ask because I’ve also tried to set the overflow-wrap or word-wrap in the css setting for the html element:
without succes unfortunately. Not sure if this is a Button-card issue or HA issue, but fact of the matter is I need the word-wrap property and can’t get it to work as it should…
We could of course hard code this, if the secondary entity_id would be allowed on action: toggle, (it isn’t yet is it?) but that would require doing so on each button.
Enabling this in an action_template would allow for setting it up in the button template once, and leave the button config simple as can be.
Loving the button card, using it for camera controls!
Quick question, is there a way of quickly blinking the button to simulate the button being pressed? In my example, I want the card to change colour when I click it to run a script, or to send mqtt messages.
Thanks!
There’s already a haptic option if you use the IOS beta app. I’m not sure that sound is a good idea but maybe vibrate for other phones could be interesting. Could you open a feature request on Github please?
I’ll have a look into this, please open a feature request. In the meantime, I think you can use config-template-card
yes, that works, thank you! tried it with only word-break: ( since i had word-wrap before and hadn’t seen than yet), but that wouldn’t work. Now Ill check why it needs text-overflow and white-space: unset …
Is it possible to specify a maximum size for a button while using aspect_ratio:? The idea being a button cannot exceed a specific dimension when viewed on larger screens.
Case in point - when I load my homekit-like buttons, which leverage a 1/1 aspect ratio, they look normal on my iPad Air 2 but are gigantic on my iPad Pro. Being able to specify something like max_size:xxx or max_height/width:xxx in conjunction with aspect_ratio: would be awesome.
is there a way to make a tapaction to an external website (link) ? navigation_path: '' seems to work only for internal navigation.
I didnt find any other information. Any help where i could change myself? Thanks!
Thanks for your reply, but how do i define an icon in the state/value/styles option?
If i define the icon in the template, it works, but then i can’t use the template for other buttons,