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

Template in Blueprint: Using input as string

$
0
0

I would like to use a blueprint input as a string variable.
This way i always get an Template Error: str: Must provide a device or entity ID

variables:
  my_var= !input my_sensor
service: zha.set_zigbee_cluster_attribute
  data:
    ieee: '{{ (device_attr(my_var , 'identifiers')|list).0.1 }}'
    ...

It will work, if i specify the string as a variable:

{% set my_var= 'binary_sensor.my_sensor' %}
service: zha.set_zigbee_cluster_attribute
  data:
    ieee: '{{ (device_attr(my_var , 'identifiers')|list).0.1 }}'
    ...

But since binary_sensor.my_sensor is coming from a blueprint input, i cannot do so.
Is there a way to make it work?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106647

Trending Articles



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