I cannot use a template in “for” section:
- condition: state
entity_id: !input xxxxx
state: 'off'
for:
minutes: "{{ VALUE_LONG_PERIOD_1 | int }}"
Getting an error:
... expected float for dictionary value @ data['action'][4]['for']['minutes']. Got None
This works:
- condition: state
entity_id: !input xxxxx
state: 'off'
for: '00:03:00'
This works too:
- condition: state
entity_id: !input xxxxx
state: 'off'
for:
minutes: 3
The “VALUE_LONG_PERIOD_1
” is a variable which is definitely assigned (I checked it - the value is outputed by Telegram notification):
variables:
INPUT_LONG_PERIOD_1: !input input_INPUT_LONG_PERIOD_1
VALUE_LONG_PERIOD_1: "{{ states(INPUT_LONG_PERIOD_1) }}"