Hello!!
Using the manual alarm, is it possible to enter a code only to disam de alarm but not to arm?
Not that I’m aware, at least not with the alarm module itself. Either you’re using a code or you’re not.
Only way round this would be to have an automation that arms the alarm for you and passes the code as a parameter.
Guess you could create an input_boolean that triggers the alarm, or a script?
I thought that with the optional variable “code_template” and “to_state” it could be done in the configuration o the alarm, but I have not been able to find any example.
How can I pass de code as a parameter?
e.g. in a script
'1534081585829':
alias: turn alarm on
sequence:
- data:
code: '666' #code_template also possible? i dont know atm, but i think not
entity_id: alarm_control_panel.door_alarm
service: alarm_control_panel.alarm_disarm
Thanks for your your help. I will try to use an automation like you have suggested.
But I’m still curious about what the variable “code_template” is for. Does anyone have an example?
Check my config
I also pass the code by Node RED:
Whereever an input is possible, it will be parsed.
E.g. a keyboard connected, wait until 4 chars arrive and test against alarm service, then sleep.
Or if I say a sentence to snips.ai check if the possibility value is above 0.9, then unlock.
More benefit
Not sure if this was available a year ago, but anyone searching this now, you can use the code_arm_required
option as per the documentation.
This will allow code to only be needed when disarming
code_arm_required: false
Hi Brendan, was there anything else you had to add in for this to function do you mind sharing?
I just followed the documentation. Nothing extra