Hello Friends,
Been searching in internet but nothing worked in my case. Always getting below error. My understanding was for_each should loop through each item in its list
Error:value should be a string for dictionary value @ data['actions'][5]['sequence'][2]['else'][0]['device_id']. Got ['xxxxxxxxxx', 'yyyyyyyyyyy'].
input:
notify_device:
name: "Device to notify"
selector:
device:
integration: mobile_app
multiple: true
### removed lines in between
- if:
- condition: template
value_template: "{{ notify_device_id | length > 0 }}"
then:
- repeat:
for_each: !input notify_device
sequence:
- device_id: repeat.item ## This is where the problem is coming
domain: mobile_app
type: notify
title: !input notification_title
message: "The {{ binary_sensor_friendly_name }} is closed."
else:
- device_id: !input notify_device
domain: mobile_app
type: notify
title: !input notification_title
message: "The {{ binary_sensor_friendly_name }} is closed."