This has been mentioned in discussions, but I can’t find it under feature requests, so I’m entering it as a feature request. Please upvote if you agree.
The basic issue is described at [Input_slider value used in automation for a delayed switch off doesn’t work] (Input_slider value used in automation for a delayed switch off doesn't work)
The request is to allow a template to work following “for:” as below. For completeness, templates should work for “above” and “below” also.
trigger:
platform: state
entity_id: sensor.vision_zp3111_multisensor_4in1_burglar_10_10
above: '0'
below: '8'
for:
minutes: '{{ states.input_slider.nachspielzeit.state | int }}'
The workarounds I have seen add complication which makes things harder to maintain.