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

How to build an entity_name from variables

$
0
0

I have the following code:

   {% set total = namespace(value=0) %}
    {% set scene = states ("input_select.active_scene_wohnen") %}
     {% for entity in state_attr("scene.wohnen_ambiente", "entity_id") %}
     {% set total.value = total.value + 1 %}
     {% endfor %}
     {{total.value}}
     {{scene}}
     {{state_attr("scene.wohnen_ambiente", "entity_id")}}

the scene name is build by “scene.wohnen_xxx” and xxx is given by the scene variable. How can I build the correct entity name for my {{state_attr(“scene.wohnen_xxx”, “entity_id”)}}

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 106286

Trending Articles



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