I have this template trigger that results in “true” when it supposed to in the template editor but it doesn’t do the same when put into the automation.yaml
value_template: "{% if((as_timestamp(now())-as_timestamp(states.switch.sonoff__room_fan.last_updated)) | int /60) > (states.input_slider.bedroomfan_timer_minutes.state | int + states.input_slider.bedroomfan_timer_hours.state | int * 60) -%}true{% endif %}"
probably because it doesn’t evaluate to a boolean.
Try this:
`
“{{((as_timestamp(now())-as_timestamp(states.switch.sonoff__room_fan.last_updated)) | int /60) > (states.input_slider.bedroomfan_timer_minutes.state | int + states.input_slider.bedroomfan_timer_hours.state | int * 60) }}”