Hi guys,
I’m trying to customize the displayed favorites in my Sonos Custom Card. Therefore I use the following template to exclude favorites that don’t contain a special paraphrase:
{% for item in state_attr(‘sensor.sonos_favorites’, ‘items’).values() |
reject(‘match’, ‘NDR’) | list %}
- {{item|e}}{% endfor %}
The output in the Template Editor looks fine:
After that I added the code to the
favoritesToIgnore
property:
favoritesToIgnore: >
{% for item in state_attr(‘sensor.sonos_favorites’, ‘items’).values() |
reject(‘match’, ‘NDR’) | list %}
- {{item|e}}{% endfor %}
But it doesn’t have the desired effect. The favorites are empty.
Adding the output of the Template Editor to the
favoritesToIgnore
property leads to my wanted behavior.
What am I doing wrong?