Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95394

Cant select/map attributes 'title' in template

$
0
0

@Mariusthvdb wrote:

using

{% set noti = states.persistent_notification
   |selectattr('state','eq','notifying')|map(attribute='entity_id')|list %}
{{noti}} 

works fine and returns a list of ‘on’ notifications with the entity_id. However, I want the show a list of titles, using

{% set noti = states.persistent_notification
   |selectattr('state','eq','notifying')|map(attribute='title')|list %}
{{noti}} 

which does nothing (shows ‘Undefined’ in the list for the number of ‘on’ notifications)

Ive checked a current persistent notification itself,

{{states.persistent_notification.rss_feed_home_assistant_0_107.attributes.title}}

which works fine:

this is the full attributes list of the notification:

had a long day of puzzling, so must be overlooking the obvious… please have a look? thanks!

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95394

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>