Hello… @ktownsend-personal Thank you Keith for having “summarized” the possibilities of button-card. I am using button-card features with templates a lot, it is very powerful… My dashboard is full of button cards (resuming nearly on one view what I have in 15 others), this is giving me back a lot of information for the two locations where I am using HA (alarm status, elements on or off, if some elements have automations and the status of these automations: on or off, problems, availability HA upgrades, status of connections on the network, electrical power consumption/production, AirCo/heaters status… I started to use button-cards a few months ago and I am still working on it to put more information in this dashboard…Here is a print screen of my dashboard… Wish you a lot of fun and satisfactions with button-cards.
My climate button is the most intricate use of the custom button-card I have done so far. The possibilities are endless
Hello, dumb question from nub. i bookmarked all your creation here and so far my lovelace looks great than before. but my question is can this button combined with fan control entity row to show a compact graphical control row for 3 speed fans ? thanks
Do you mean something like what I have at the bottom of the picture in the original post? It can be done with 5 custom button cards. One as a container for the other four. Check out the “Multi-option Button” section in the original post.
oh sorry, i didnt see there is fan option already at original post
will working out fan button next. thank you for inspiring, this is my result so far
That example is using show_label: true
to activate the 2nd line of text. You can put different text there by specifying label: whatever text you want
, or in their case they are using show_last_changed: true
to get that value from the entity.
That’s what I needed. I’m going to have to dig in deeper to the code to see if there are other activators I missed.
Thanks again.
Thanks for the great write-up. The more I use Home Assistant, the more I find out what I didn’t know I could do. I have used the custom button card for a while, but never took the time to learn the power of it. Thanks for posting your templates. Do you have one that can be used to replace the built in badges? I use the badges for a quick glance at different sensors. The custom button, looks like it would work better.
I’m using my ‘alerter’ template for some of my sensors. You may find some inspiration there. I’m doing a flash animation when doors are open. I haven’t ever used the built in badges because they don’t look good to me.
I’ll start playing with it . I liked using the badges as they are small and give information at a glance. My first go at the custom button card was much bigger, and harder to place where I wanted it on my page.
I created a template yaml.file that gets loaded via the “package”. No errors when I check the config, but when I reference the template I get Button-card template ‘standard’ is missing! I tried different ones of yours, some others from other people and the lovelace button card never finds the template name. Obviously I am not understanding something and I have configured something incorrectly. Any idea on what?
@bschatzow, It’s not working because the custom button card templates don’t get loaded via “package”. They need to go in your raw dashboard config, typically at the top. If you use the UI to design your dashboards, first get into edit mode in the UI, then click the same 3-dot menu icon again and choose Raw configuration editor
. I usually put it right below the title property. Just add a new property button_card_templates:
and below it you define your named templates.
For detailed info on how to define templates, there is a good section about it in the documentation for the custom button card here . In general, you define the template the same as you would if you were using the element in your dashboard, but you leave out the settings that would change (like entity). Then, when you use a custom button card in your dashboard you simply refer to your template by name in the template setting and add the unique settings for that button.
I don’t have anything in my config.yaml file except different includes, package etc. Not understand why this doesn’t work the same as other sensors I load via template yaml files.
3d thread with the same question… instead of asking everyone, why not try to read the docs a bit more thoroughly? It’s all there
It’s because this isn’t a sensor. It’s a part of the Lovelace definition. (A completely different file in a different location.) The easiest way to edit that definition is exactly as ktownend-personal (Keith) describes above.
I finally understood what was being said. The template is loaded in the lovelace UI file, not in the configuration.yaml file. I am assuming it goes at the top of the main ui-lovelace.yaml file?
Sorry, I did read it and was confused by the wording.
.... but without using YAML anchors and is very useful if you split your config in multiple files
I split my configuration,yaml file into multiple files so I assumed incorrectly that the documentation was talking about the configuration.yaml files and not the main ui-lovelace.yaml file. I have never put anything other than resources and views in this file.
That’s referring to when you use manual yaml for your dashboard instead of editing your dashboard with the Lovelace UI. That’s a whole different animal, but I personally found it worth doing so I could more easily re-use parts of my dashboard layouts on multiple dashboards.
Keith,
No issues. I forgot about the ui-lovelace.yaml file as I never change it. I was referencing above to @Mariusthvdb. Saying to follow the directions. The directions on Github is what I was referring to. I wrongly assume that the “config” mentioned was my configuration.yaml (also split in many ways).
I uses multiple views for my lovelace interface. These are loaded via my ui-lovlace.yaml which I seldom touch, (almost never). All my editing of “Lovelace” is done in my different “views” yaml files and in the resource.yaml. I didn’t realize you could add templates to this file.
As I said many times, the more you use Home Assistant, the more you find out you don’t know and the more you need to learn. Threads like this and with the of the community it makes it an enjoyable experience.