I’m having a terrible time with decluttering, mostly because I’m a newbie at this but at least in part that I followed the storage instructions when I’m a GUI user and I’d never heard of the raw configuration editor.
I downloaded decluttering-card.js with HACS. I can see it in www/community/decluttering-card/decluttering-card.js.
I use the raw configuration editor in my dashboard to add:
decluttering_templates:
menu:
card:
type: custom:button-card
name: '[[name]]'
icon: mdi:'[[icon]]'
tap_action:
action: call-service
service: script.togr
service_data:
room: '[[room]]'
styles:
icon:
- color: |
[[[ if (states['[[room]]'].state == 'on')
return "#FF00FF";
else return "var(--primary-text-color)"; ]]]
and then add a card to my dashboard:
type: custom:decluttering-card
template: menu
variables:
name: Lights
icon: home-floor-3
room: input_boolean.r3
The error I get is
**e.slice is not a function**
type: custom:decluttering-card
template: menu
variables:
name: Lights
icon: home-floor-3
room: input_boolean.r3
This seems to be a javascript error, and the first function in decluttering-card.js is named e.
I restarted HA and cleared my browsing data without changing the outcome.
Advice?