I am trying to convert my hard coded irrigation automation to use and input_number helper.
I do not understand the templating syntax for input_numbers - what is the correct syntax?
alias: Sprinkler Water Cactus hard coded
description: ''
trigger:
- at: '10:00:00'
platform: time
condition:
- condition: template
value_template: '{{ now().strftime(''%j'') | int % 14 == 0}}'
action:
- data: {}
service: script.turn_on
target:
entity_id: script.sprinkler_cactus
mode: single
I want to convert the condition to use and input_number instead of the hard coded 14
condition:
- condition: template
value_template: '{{ now().strftime(''%j'') | int % states(''input_number.cactus_days'') == 0}}'
that structure is not passing the test button. → template value should be a string for dictionary value @ data[‘value_template’]. Got None