Hi guys, i have the following script to copy the state of many input_boolean:
alias: CopiaTermo
sequence:
- repeat:
for_each:
- "0"
- "1"
- "2"
- "3"
sequence:
- data_template:
entity_id: input_boolean.temp_00{{states('input_text.termoa') ~ "_0_" ~ repeat.index}}
service_template: >-
input_boolean.turn_{{states("input_boolean.temp_00" ~
states('input_text.termoda') ~ "_0_" ~ repeat.index)}}
mode: single
The proble is that the “0” item result in input_boolean.turn_unknown service (but the relative input_boolean exist and all other item do the work). Maybe a bug? How can I workaround?
Second question: how can I substitute 0, 1, 2, 3 items with a template (example 0 to 3 numbers)?
Thanks a lot!