You need a matching state e.g.
state:
- value: 'on'
spin: true
You need a matching state e.g.
state:
- value: 'on'
spin: true
Those are valid requests, but unfortunately not yet possible Could you please create 2 feature requests on github?
I still cant get it to work⌠The icon remain black even if I use red and yellow as colorâŚ
- type: horizontal-stack
cards:
- type: "custom:button-card"
entity: input_boolean.alarm_1_mon
name: Mon
icon: mdi:alpha-m-box-outline
tap_action:
action: call-service
service: input_boolean.toggle
service_data:
entity_id: input_boolean.alarm_1_mon
show_state: false
show_name: true
color_type: icon
styles:
icon:
- color: >
[[[
if (states['input_boolean.alarm_1_mon'].state == 'on' && states['input_boolean.alarm_1_enable'].state == 'on') return 'blue';
return 'yellow';
]]]
The configuration seems correct. Are you sure youâre using the latest version? Please clear your browser cache and retry.
I was on 2.0.4 but I didnât see that there was any change that I usedâŚ
I swapped to 2.0.5 and now it works⌠Sorryl
And thx for the help!
please note that since you are using the entity input_boolean.alarm_1_mon
for your button, you can also use this as your template:
- color: >
[[[
if (entity.state == 'on' && states['input_boolean.alarm_1_enable'].state == 'on') return 'blue';
return 'yellow';
]]]
Hi again, its possible agree a camera entity to this card?
that is awesome then I can copy-paste it to the rest without changing the code! Thx dude!
I have my custom buttons showing up beautifully, however they are not clickable, any ideas?
I did define an action type service.
Without your config it will be hard to help you
I seem to be missing âsomethingâ:
Indentation maybe?, update to the latest version and clear your browser cache please:
type: âcustom:button-cardâ
color_type: card
tap_action:
action: call-service
service: remote.send_command
service_data:
entity_id: remote.living_room_remote
device: 64382946
command: âMuteâ
icon: mdi:volume-off
color: rgb(75, 75, 77)
Mixing config that is with one that isnât compatible (one button was right the other wasnât) with the current version was the culprit. All is well now.
Any way to allow for unit_of_measure as a true/false config state?
I tried using custom_fields, but somehow the field wonât show up on Chrome on my Android phone.
custom_fields:
states: >
[[[
return `${entity.state}`
]]]
Everything is in the documentation:
show_units: false
Thank you and sorry.
I must be sleepy or something
I canât seem to find a way to color the card AND the icon, not possible?