Upgraded to 0.91, automation is getting a "Error rendering data template: UndefinedError: 'trigger' is undefined"

it is. This config should work after you make changes and restart (or reload automations):

- id: '1574917260819'
  alias: Kitchen Motion to MQTT
  description: ''
  trigger:
    entity_id: binary_sensor.kitchen_motion_motion
    platform: state
  condition: []
  action:
    data_template:
      payload_template: '{{ trigger.to_state.state }}'
      topic: home/kitchen/motion
    service: mqtt.publish

Well, itā€™s a kitchen motion sensor and it is Thanksgiving so I should get plenty of data points to test! :smiley:

BINGO! So, all along it was because I didnā€™t restart the server. I was fooled by the fact that it seemed to accept the changes on-to-fly. At least changes to labels and such would be reflected in the web UI immediately. Lesson learned. Thanks!

Haha, donā€™t worry, the nuances will come in time

Hello.
What could be the problem?
Automation does not work.
I get an error

This text will be hiddenError rendering template for call_service at pos 1: UndefinedError: 'trigger' is undefined

Here is the automation.

- id: '1587827'
   alias: Send message, when devices conect to 2.4GHz
   description: ''
   trigger:
   - entity_id: sensor.router_connected_chip2
     platform: state
   condition: []
   action:
   - data:
       message: '{{trigger.to_state.state}}'
     service: notify.cannel

Automation and the server restarted.

The question is removed.
My mistake:
Need

action:
   - data_template:

not

action:
   - data: