addyire / ha-menu

An app to interact with Home Assistant in the macOS menu bar.
MIT License
236 stars 1 forks source link

How can I check an item when it is on? #8

Closed FOSV closed 1 year ago

FOSV commented 1 year ago

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 1 year ago

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