Add simple data template ability to visual editor

I created a irrigation automation completely using the visual editor with dedicated Lovelace page. Fantastic! Where this broke was when I wanted to set the runtime dynamically in Lovelace using an input_datetime.
Instead of

- service: timer.start
  data:
    duration: '30'

I am now using

- service: timer.start
  data_template:
    duration: '{{ states.input_datetime.irrigation_frontyard_run_time.state }}'

which is fine BUT
it completely breaks the ability to use the visual editor for further editing

The above line is embedded in a complex Choose operation at which the visual editor swithes into YAML view - but doesn’t even display all to the end

This gave me a heart attach until I found that switching to “Edit in YAML” still showed the whole automation

I love the ability with the new visual editor - but it kin of defeats the purpose if a simple chnage such as this completely breaks it.

Hi and welcome to the forum.

Please have a read of point 11 here, then edit your post to correctly format your configuration examples.

The automation editor is currently intended for basic automations. Templates are considered “advanced” automation and you should be comfortable using YAML if using them.

Template support may be added to the editor in future but I don’t think it is a priority right now.

Also, don’t forget to vote for your own request.

Hi Tom,
I understand what you are saying regarding templating.
I get it done - with a lot of googling etc. - the visual editor is just so much faster.

I just felt weird to me that it is possible to use an input_datetime as a trigger condition whereas it is not possible to use it to set a timer duration. That seems to be a rather common use case.

Still giving it my vote :slight_smile: