Looking for a way to setup an automate if a code in entered into the lock, HA will disable Alarmo.
The current keymaster automation to notify a user when a lock has been unlocked with a code can probably be modified or used as a template for a second automation. For example, the keymaster notification automation that is triggered when a code is used to unlock my back door is:
alias: keymaster_backdoor2 User Notifications
triggers:
- event_type: keymaster_lock_state_changed
event_data:
lockname: backdoor2
trigger: event
conditions:
- condition: template
value_template: "{{ trigger.event.data.code_slot > 0 }}"
- condition: template
value_template: >-
{{ is_state('input_boolean.notify_backdoor2_' +
trigger.event.data.code_slot | string, 'on') }}
- condition: state
entity_id: input_boolean.backdoor2_lock_notifications
state: "off"
actions:
- data_template:
title: backdoor2
message: >-
{{ trigger.event.data.action_text }} ({{
trigger.event.data.code_slot_name }})
action: script.keymaster_backdoor2_manual_notify
Maybe add a second action like this one:
action: alarmo.disarm
data:
entity_id: alarm_control_panel.alarmo
I assume you might have to disable the Alarmo option to “Require code for disarming”, or maybe there’s a way to pass the alarm code in the alarmo.disarm action.
I will have to give this a try and see what happens. I did just now add this to the garage_lock_keymaster_common.yaml file.
I do not have the Require Code for disarming option enabled. Also I’m not sure if I need to place this 3 lines of code in the Automation or the Script.