Automation Script error for message {{ trigger.to_state.name }}

Using an automation written in the automation old file it works.The code beeing:

- id: os_updater_available_yaml
  alias: OS Update Available
  initial_state: true
  trigger:
    - platform: state
      entity_id: binary_sensor.updater, 
                 binary_sensor.updater_addons,
                 binary_sensor.updater_hacs,
                 binary_sensor.updater_supervisor
      to: 'on'
  action:
    - wait_template: >-
        {% if "11 :00" < now().strftime("%H:%M") < "21:00" %}
          True
        {% endif %}
    - service: notify.me
      data_template:
        title: 'HA - Information'
        message: >-
          OS {{ trigger.to_state.name }} is available

But using the Automation GUI editor I cant get the automation to work due to this error:

“System OS updater Notification: Error executing script. Error rendering template for call_service at pos 2: UndefinedError: ‘trigger’ is undefined”


What am I doing wrong in the editor?

Your service data: need to be in data_template. I don’t use the editor so am not sure if it supports this.

I did not notice that. And yes, thats the issue. Looks like it does not support data_template.