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

How can I template both keys and values?

$
0
0

Is there a way to template both keys and values?

I’ve tried:

  actions: |-
      {%- for entity in room_entities -%}
      - action: 'autoroom_{{ entity }}'
        title: '{{ state_attr(entity, 'friendly_name') }}'
      {%- endfor %}

but it becomes

    actions: |-
      - action: 'autoroom_light.wohnzimmer_dimmer'
        title: 'Wohnzimmer Dimme

and it should become

    actions:
      - action: 'autoroom_light.wohnzimmer_dimmer'
        title: 'Wohnzimmer Dimme

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106084

Trending Articles



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