button-card
button-card copied to clipboard
Hide "chips" depending on the state of a device
Is your feature request related to a problem? Please describe. The basic idea is that I want to be able to change to anothet template depending on the state of a device.
Describe the solution you'd like I think it should look like this:
chips_carheater:
template: |
[[[
if (states['switch.on_off_plug_in_unit_32'] == 'on'){
return chips;
}else{
return chips_hide; }
]]]
chips
and chips_hide
are two diffrent templates.
Describe alternatives you've considered I check the instructions and can not see that it is possible to use JS in template.
Additional context
That is not possible unfortunately as the template is only loaded once when the card initially renders.