Just as an FYI, with the latest beta, that card won’t update when there is an update to the entity referenced in the variable unless you set the triggers_update config value to the entity from the variable.
I think I’ll introduce one time (on init) evaluation of templates in the triggers_update field
Is there any way to make a button appear quicker for switches?
I have switch templates for my harmony remote. Tap a button and the harmony hub switches on the activity. Problem is the hub doesn’t report back instantly so it appears the button hasn’t been done (5-10 second delay in the button updating from off to o)
I guess this is more a harmony thing as hue bulbs and my RM mini are pretty responsive. Just wondering if it’s possible to fake it some how for a better experience. If not I might have to think of another method for my harmony.
Nope, this is a harmony thing. The device itself is reporting that it’s off. You could get fancy with a switch template and an input boolean. But you’d need to pair it with an automation that monitors the current activity.
VM64335:3 Uncaught (in promise) TypeError: states is not a function
at HTMLElement.eval (eval at _evalTemplate (button-card.js:1578), <anonymous>:3:16)
at HTMLElement._evalTemplate (button-card.js:1578)
at HTMLElement._getTemplateOrValue (button-card.js:1584)
at HTMLElement._buildLabel (button-card.js:1641)
at HTMLElement._gridHtml (button-card.js:1741)
at HTMLElement._buttonContent (button-card.js:1737)
at HTMLElement._cardHtml (button-card.js:1712)
at HTMLElement.render (button-card.js:1534)
at HTMLElement.update (button-card.js:569)
at HTMLElement.performUpdate (button-card.js:479)
VM73418:4 Uncaught (in promise) TypeError: Cannot read property 'state' of undefined
at HTMLElement.eval (eval at _evalTemplate (button-card.js:1578), <anonymous>:4:18)
at HTMLElement._evalTemplate (button-card.js:1578)
at HTMLElement._getTemplateOrValue (button-card.js:1584)
at HTMLElement._buildLabel (button-card.js:1641)
at HTMLElement._gridHtml (button-card.js:1741)
at HTMLElement._buttonContent (button-card.js:1737)
at HTMLElement._cardHtml (button-card.js:1712)
at HTMLElement.render (button-card.js:1534)
at HTMLElement.update (button-card.js:569)
at HTMLElement.performUpdate (button-card.js:479)
That’s telling you that the entity doesn’t exist. Verify the name used in the quotes… i.e. 'zwave.aeotec_zw090_zstick_gen5' probably has a spelling error. Looking at mine, i’d expect the name to be 'zwave.aeotec_zw090_z_stick_gen5'
Hi, I would like to make the light buttons automatically scale to the width on the horizontal stack but can not work it out any help would be greatly appreciated.
I have just noticed that my default button-cards will show its icon as white for both ON and if the device is “unavailable” (Tuya light). Thus any TUYA devices that have no power and unavailable are showing a white icon as if they were ON.
Can someone help in how I define unavailable and maybe change the icon and color. Here is a simple card
color: auto
entity: light.08836146600194dc5165
icon: 'mdi:lamp'
name: Trent
type: 'custom:button-card'
I have been trying for many hours now but cant get this correct.
How do I stop the cards from ending up outside of the edge?
How do I add a gap between the cards to “glow” individualy?
Thanks // Fredrik
remove height and margin from the card style. more specifically, margin is pushing it. You can probably keep height. But typically if you want buttons that are the same size, use ratio don’t use height. Height will make the button look weird on specific platforms. May look great on mobile but then on desktop it’ll look small.
Okey, but how do get them located example 30px away from the edge and with 30px gap between them?
I don’t want them to collide or get the glow to be cut off by the edge…