FutureTense / keymaster

Home Assistant integration for managing Z-Wave enabled locks
MIT License
229 stars 43 forks source link

ISSUE: Notifications not working after KeyMaster update - Error rendering data template #380

Open Frazior opened 1 month ago

Frazior commented 1 month ago

After an update in May 3(so 0.91-0.94) notifications from a child lock automation (keymaster_back_door Lock Notifications) stopped working. When I run a trace on the automation I get the following:

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

service: script.keymaster_back_door_manual_notify
data_template:
  title: back_door
  message: >-
    {{ trigger.event.data.action_text }} {% if trigger.event.data.code_slot > 0
    %}({{ trigger.event.data.code_slot_name }}){% endif %}

I did google the error but and found info but am completely lost about what it means. Any help is greatly appreciated.

Environment:

Frazior commented 1 month ago

Here are some add'l log entreies -

  Logger: homeassistant.helpers.template
  Source: helpers/template.py:2652
  First occurred: 1:07:07 PM (1 occurrences)
  Last logged: 1:07:07 PM

  Template variable error: 'dict object' has no attribute 'event' when rendering '{{ trigger.event.data.action_text }} {% if trigger.event.data.code_slot > 0 %}({{ trigger.event.data.code_slot_name }}){% endif %}'

  Logger: homeassistant.components.automation.keymaster_back_door_lock_notifications
  Source: helpers/script.py:2002
  integration: Automation (documentation, issues)
  First occurred: 1:07:07 PM (1 occurrences)
  Last logged: 1:07:07 PM

  keymaster_back_door Lock Notifications: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'