ISSUE: Unable to get notifications working
Describe the bug
Pretty sure I'm just missing something on my end, but I'm not able to get notifications working. I have a keymaster_
keymaster_<lockname>_manual_notify:
mode: parallel
sequence:
- service: notify.mobile_app_<devicename>
data:
title: "{{ title }}"
message: "{{ message }}"
Environment (please complete the following information):
- OS: HassOS
- Type of system that HA is running on: RPi
- Home Assistant version: Been happening for quite some time, but currently on 2025.1.4 Core, 2024.12.3 Supervisor, 14.2 OS)
- Core
- Component version: v0.0.99
- Z-Wave integration name: zwave_js
- Lock make and model: Kwikset 910
Logs
2025-02-03 12:28:44.795 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration keymaster which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-02-03 12:50:31.064 ERROR (MainThread) [homeassistant.components.script.keymaster_<lockname>_manual_notify] keymaster_<lockname>_manual_notify: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:31.065 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] keymaster_<lockname> Lock Notifications: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:31.066 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] Error while executing automation automation.keymaster_<lockname>_lock_notifications: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:35.553 ERROR (MainThread) [homeassistant.components.script.keymaster_<lockname>_manual_notify] keymaster_<lockname>_manual_notify: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:35.554 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] keymaster_<lockname> Lock Notifications: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:35.555 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] Error while executing automation automation.keymaster_<lockname>_lock_notifications: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.196 ERROR (MainThread) [homeassistant.components.script.keymaster_<lockname>_manual_notify] keymaster_<lockname>_manual_notify: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.196 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] keymaster_<lockname> Lock Notifications: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.197 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] Error while executing automation automation.keymaster_<lockname>_lock_notifications: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.562 ERROR (MainThread) [homeassistant.components.script.keymaster_<lockname>_manual_notify] keymaster_<lockname>_manual_notify: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.563 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] keymaster_<lockname> Lock Notifications: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 12:50:53.564 ERROR (MainThread) [homeassistant.components.automation.keymaster_<lockname>_lock_notifications] Error while executing automation automation.keymaster_<lockname>_lock_notifications: Error rendering data template: UndefinedError: 'trigger' is undefined
2025-02-03 14:13:22.761 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'keymaster' sets option flow config_entry explicitly, which is deprecated at custom_components/keymaster/config_flow.py, line 104: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at https://github.com/FutureTense/keymaster/issues
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here. Please add emails in plain/text format if possible and applicable.
You are to replace the stuff in <> with your entries.
You are to replace the stuff in
<>with your entries.
Yes, I know that. I was redacting the actual device names.
Seems that you have placed the notification under the automations rather than scripts so it's expecting a trigger.
No, it's in scripts, not automations.
Make sure the names match.
As in the name of the script? I only have the one manual_notify script. It can be seen in the logs I pasted above. Here is a snippet showing it:
2025-02-03 12:50:53.562 ERROR (MainThread) [homeassistant.components.script.keymaster_<lockname>_manual_notify] keymaster_<lockname>_manual_notify: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined
Check the automation to make sure the trigger populated correctly.
What should it look like?
Depends on which one's firing, but here's an example:
- alias: keymaster_frontdoor Lock Notifications
id: keymaster_frontdoor Lock Notifications
trigger:
platform: event
event_type: keymaster_lock_state_changed
event_data:
lockname: frontdoor
...
This is what was setup back when I added the integration a year or so ago:
alias: keymaster_<lockname> Lock Notifications
triggers:
- event_type: keymaster_lock_state_changed
event_data:
lockname: <lockname>
trigger: event
conditions:
- condition: state
entity_id: input_boolean.<lockname>_lock_notifications
state: "on"
actions:
- data_template:
title: <lockname>
message: >-
{{ trigger.event.data.action_text }} {% if trigger.event.data.code_slot
> 0 %}({{ trigger.event.data.code_slot_name }}){% endif %}
action: script.keymaster_<lockname>_manual_notify
For some reason your trigger isn't being defined. What version of HA?
Edit: nm I see you're running 2025.1.x, no idea why your trigger is broken.
Any ideas on how to fix it?
Nope