Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'`

Hi - I’m trying to use the Netgear LTE service as listed in here NETGEAR LTE - Home Assistant
Below is my automation script following the example

alias: LTE
description: ""
trigger:
  - platform: event
    event_type: netgear_lte_sms
condition: []
action:
  - service: conversation.process
    data:
      agent_id: homeassistant
      text: "{{ trigger.event.data.message }}"
  - service: netgear_lte.delete_sms
    data:
      host: "{{ trigger.event.data.host }}"
      sms_id: "{{ trigger.event.data.sms_id }}"
mode: single

But when I fire the automation, I get Error: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'

Any help please

You haven’t let us know which line the error is pointing to, as I suspect that is not all of the error.

Regardless, I suggest reading over this post in case it helps you figure this out. I suspect that one or more of your data keys are not there. IE there is no sms_id key under trigger.event.data, or something on that order. Since I cannot see your data trace, I cannot tell you what exists and what doesn’t in your trigger data. You have to verify that all of the keys you are calling out actually exist in your trigger.

Hi James,
It appears the automation is being triggered when the sms arrives in the inbox on the LTE modem but not from the UI when I was trying to force it.

So the next question is how to then force or control this automation. How do I bind it to a simple binary switch to trigger it and then read payload (text)

You don’t want to bind it to a switch because there would be no event and no payload to read. What you need to do is to create the event including the payload. To test out your automation, go to developer tools → Events and create a netgear_lte_sms event with whatever payload data that would normally come with it.

If you don’t know what the event looks like, you can subscribe to those events on that same page and wait for one to occur.