Hey everyone,
I have some scripts that run my irrigation routines.
They worked perfectly for over a year now but they fail to fire after 0.109 update.
I am getting this error when i try to run the automation:
hk_irrigation_irrigate_a_zone: Error executing script. Unexpected error for condition at pos 1: can only concatenate str (not "int") to str
Part of my scripts that **i think **is causing the problem is below:
hk_irrigation_irrigate_a_zone:
sequence:
#=== Don't continue if switch is unavailable
- condition: template
value_template: >
{{ states('switch.hk_irrigation_valve_' + valve ) != 'unavailable' }}
# #=== Don't continue if duration is zero
- condition: template
value_template: >
{{ (states('input_number.hk_irrigation_valve_' + valve + '_duration') | int) != 0 }}
#tried removing the | int part from here, but it still gives an error
The script is called by another script that passes the value of each valve:
- service: script.hk_irrigation_irrigate_a_zone
data_template:
valve: 2 # 1,2,3,4 accordingly
Each time the first script is called by the second, it checks the durations set as input numbers by my UI and acts accordingly.
This stopped working after the last update to 0.109.
Any clues appreciated.
Let me know if you need more parts of the code.