@LKrisM wrote:
I try to create a simple script to set the position for a specified cover. If I use a fix entity_id in the script everything works fine but If I try to use a variable entity_id in the data_template I receive the error “not a valid value for dictionary value @ data[‘entity_id’]”.
As I understand, that should work, but i doesn’t.
set_cover_position: sequence: - service: cover.set_cover_position data_template: entity_id: "{{device}}" position: >- {% if modus == close %} 0 {% else %} 100 {% endif %}
Thats how I call the script:
- type: button name: "Close cover" icon: mdi:arrow-down tap_action: action: call-service service: script.set_cover_position data: device: 'cover.dining_room' modus: 'close'
I tried a lot of different variations in the data template but nothing works.
What I’m doing wrong?
Posts: 2
Participants: 2