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