Is there a way using the button to show feedback? I have a bunch of buttons that are 1 liner scripts that have no on/off status. I’d like to flash the button with a different style for half a second to let the user know the button was pressed. Is this possible?
I don’t know if this is of any use to anyone, but I wanted to share my lovelace setup with you guys. Why in this thread you might ask? Well because the majority of my lovelace setup consists of this mighty button-card (lets say almost 80% of my setup are these buttons?).
Anyways I hope you guys can make use of it.
Thread:
Thanks , thought I did both but will check again. no easy way of finding the version in the .js file?
Made me thinking : this couldn’t be caused by entities not being available? I ask because I have my Hue lights on the buttons, and they are logged ‘unavailable’ regularly… (long story)
Also some simply are powered off, so they should show unavailable on the button (which they do btw)
have custom updater installed, but didn’t yet change to the new endpoints, since I don’t like custom cards requiring extra system file settings in my setup. Since the card changed white a bit lately, Ill hit and hold till things have materialized. manual updating till that time for me.
Good thing is I used your code and I just used the option you think is even better and that one works Thanks!
To make it perfect I am wondering if there’s a way to get this back as a status to this button card. Would be cool if I could get the status to switch between off / dim / on, where it now does off / on / on. If I could have different states there, then I can also use different styling for each, where I could make it greyscale when off, icon light up when dimmed and the full card light up when fully on.
color: auto is what you’re looking for , the color of the icon color will change automatically based on the light brightness.
However for the state it’s not possible (as a light is either on or off), you’ll have to use label_template and display what you want based on the state of your light.
Something like:
Ok, so I understand I need to add conditional labels and use those instead of states, but that also means I cannot do something like below? (Mock-up in Excel…, will recreate later in HASS)
That’s what I’m currently doing but I noticed that there is a graphic for pressed events. I want to modify that graphic instead of adding or creating scripts with a delay at the end. Also, the delay in response on a cellphone is long enough that the on/off doesn’t register.
There is already feedback when the button is pressed (ripple effect), but because your background is really dark, you can’t see it. I would have to modify the color of the ripple effect based on the background color, or maybe use the color as the feedback color for the ripple effect.
Is there a way for me to do it with CSS in the style section? If not, that could be a good enhancement. Nothing too pressing so don’t break your back on it. I can make a PR if that’s the route you want to go.