Template returning boolean in custom button card not working

can anyone tell me why in a custom button card I can use:
show_icon: false
which successfully hides the icon. However:
show_icon: '[[[ return false ]]]'
does not work.
I must be missing something painfully obvious.
btw I do not get any errors using the second method. It just doesn’t work.
Of course I have simplified the example down to its most basic form the actual code is evaluating a condition and returning true or false. In order to try and eliminate the chance that my logic was faulty I simplified it down to just returning false.
Any help would be appreciated.

1 Like

Javascript templating is limited to certain fields, that’s why it’s not working for you. I struggled with the same issue for quite some time today :smiley:

I know it’s an old post but my answer might save time of other people nontheless.

1 Like