As rccoleman says.
The custom_fields entry should be indented the same as your style section and look something like this:
custom_fields:
a: |
[[[
return `[code for the value of 'a']`
]]]
b: |
[[[
return `[code for the value of 'b']`
]]]
c: |
[[[
return `[code for the value of 'c']`
]]]
d: |
[[[
return `[code for the value of 'd']`
]]]
Note that the quote marks around the return values are not single quotes, but reverse single quotes (probably the key next to the 1 key on your keyboard). You can put all kinds of coding in that area. For instance, here’s one I use for displaying a status tile in my UI.
m0: |
[[[
if ('[[m0_show]]' == 'true') {
var icon = '[[m0_icon_off]]';
var icon_color = '[[m0_icon_color_off]]';
var status = '[[m0_status_off]]';
if (states['[[m0_entity]]'].state == '[[m0_on_state]]') {
icon = '[[m0_icon_on]]';
status = '[[m0_status_on]]';
icon_color = '[[m0_icon_color_on]]';
}
return `<ha-icon icon=${icon}
style="width: 14px; height: 14px; color: ${icon_color};">
</ha-icon><span style="color: white";> ${status}</span>`
}
return ``
Note that the [[things_in_double_brackets]] are variables used by the decluttering_card and [[m0_show]] is a variable set to ‘true’ if I want to display the item and ‘false’ if I don’t.