Template in Blueprint: Using input as string

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?