addyire/ha-menu

How can I check an item when it is on?

Closed this issue · 1 comments

FOSV commented

I've tried this following lines of code, but they don't work

{ "type": "label", "label": "My Light", "checkedTemplate": "{{ states('light.my_light') }}", "icon": "wall-sconce-round-variant-customTemplate@2x.png", "reload": true, "action": { "domain": "light", "service": "toggle", "serviceData": { "entity_id": "light.my_light" } } },

FOSV commented

Solved writing in this way:
"checkedTemplate": "states('light.my_light')"