Hey guys, I recently switched all my automations over to nodered. For anyone wanting some code for their alarm to get them started, feel free to use mine.
I have added input Booleas to override notifications and/or sirens too.
Code:
[{"id":"68e2c049.bef26","type":"tab","label":"Alarm","disabled":false,"info":""},{"id":"5b80215a.05166","type":"server-state-changed","z":"68e2c049.bef26","name":"Alarm Control Panel","server":"9582d396.920b1","entityidfilter":"alarm_control_panel.house","entityidfiltertype":"substring","haltifstate":"","x":150,"y":215,"wires":[["ba9b8f47.f5db6"]]},{"id":"3e856c92.abe44c","type":"switch","z":"68e2c049.bef26","name":"Alarm State","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"},{"t":"eq","v":"warning","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":580,"y":215,"wires":[["c30402a1.116e2"],["40e91996.57d4a"],["468b2094.6240d8"],["42a8363f.8decb8"],["d2e1add5.fcdf"]]},{"id":"c30402a1.116e2","type":"api-call-service","z":"68e2c049.bef26","name":"Notify Armed Away","server":"9582d396.920b1","service_domain":"notify","service":"","data":"{\"title\": \"ALARM\", \"message\": \"Armed Away\"}","mergecontext":"","x":1150,"y":150,"wires":[[]]},{"id":"40e91996.57d4a","type":"api-call-service","z":"68e2c049.bef26","name":"Notify Armed Home","server":"9582d396.920b1","service_domain":"notify","service":"","data":"{\"title\": \"ALARM\", \"message\": \"Armed Home\"}","mergecontext":"","x":1140,"y":190,"wires":[[]]},{"id":"468b2094.6240d8","type":"api-call-service","z":"68e2c049.bef26","name":"Notify Disarmed","server":"9582d396.920b1","service_domain":"notify","service":"","data":"{\"title\": \"ALARM\", \"message\": \"Disarmed\"}","mergecontext":"","x":1160,"y":230,"wires":[[]]},{"id":"43831cb1.c86e24","type":"api-call-service","z":"68e2c049.bef26","name":"Notify Triggered","server":"9582d396.920b1","service_domain":"notify","service":"","data":"{}","mergecontext":"","x":1160,"y":270,"wires":[[]]},{"id":"c06567f2.e66a5","type":"api-call-service","z":"68e2c049.bef26","name":"Notify Warning","server":"9582d396.920b1","service_domain":"notify","service":"","data":"{\"title\": \"ALARM\", \"message\": \"Warning\"}","mergecontext":"","x":1160,"y":310,"wires":[[]]},{"id":"3dd8df6e.ecc118","type":"api-call-service","z":"68e2c049.bef26","name":"Xiaomi Alarm","server":"9582d396.920b1","service_domain":"xiaomi_aqara","service":"play_ringtone","data":"{\"gw_mac\":\"286C07891F7F\", \"ringtone_id\":\"0\", \"ringtone_vol\":\"100\"}","mergecontext":"","x":920,"y":490,"wires":[[]]},{"id":"84836176.cce6b8","type":"api-call-service","z":"68e2c049.bef26","name":"Xiaomi Warning","server":"9582d396.920b1","service_domain":"xiaomi_aqara","service":"play_ringtone","data":"{\"gw_mac\":\"286C07891F7F\", \"ringtone_id\":\"11\", \"ringtone_vol\":\"100\"}","mergecontext":"","x":930,"y":530,"wires":[[]]},{"id":"7c44d016.13fca","type":"comment","z":"68e2c049.bef26","name":"Notifications","info":"","x":130,"y":140,"wires":[]},{"id":"1f3d1220.a00fa6","type":"comment","z":"68e2c049.bef26","name":"Sirens","info":"","x":110,"y":430,"wires":[]},{"id":"abd96ce4.bb8048","type":"server-state-changed","z":"68e2c049.bef26","name":"Alarm Control Panel","server":"9582d396.920b1","entityidfilter":"alarm_control_panel.house","entityidfiltertype":"substring","haltifstate":"","x":150,"y":490,"wires":[["5b8895e5.0da33c"]]},{"id":"f4fb2165.e0cef8","type":"switch","z":"68e2c049.bef26","name":"Alarm State","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"},{"t":"eq","v":"warning","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":580,"y":490,"wires":[[],[],[],["3dd8df6e.ecc118"],["84836176.cce6b8"]]},{"id":"ba9b8f47.f5db6","type":"traffic","z":"68e2c049.bef26","name":" ","property_allow":"payload","filter_allow":"on","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"off","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":350,"y":215,"wires":[["3e856c92.abe44c"]]},{"id":"73dc230f.0377d4","type":"server-state-changed","z":"68e2c049.bef26","name":"On/Off","server":"9582d396.920b1","entityidfilter":"input_boolean.alarm_notifications","entityidfiltertype":"substring","haltifstate":"","x":110,"y":285,"wires":[["ba9b8f47.f5db6"]]},{"id":"5b8895e5.0da33c","type":"traffic","z":"68e2c049.bef26","name":" ","property_allow":"payload","filter_allow":"on","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"off","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":355,"y":490,"wires":[["f4fb2165.e0cef8"]]},{"id":"6f4a2dff.be2b4c","type":"server-state-changed","z":"68e2c049.bef26","name":"On/Off","server":"9582d396.920b1","entityidfilter":"input_boolean.alarm_siren","entityidfiltertype":"substring","haltifstate":"","x":110,"y":560,"wires":[["5b8895e5.0da33c"]]},{"id":"42a8363f.8decb8","type":"function","z":"68e2c049.bef26","name":"Message","func":"msg.payload =\n{\n \"data\": {\n \"message\": \"Triggered! {{states[states.alarm_control_panel.house.attributes.changed_by.split(\\\".\\\")[0]][states.alarm_control_panel.house.attributes.changed_by.split(\\\".\\\")[1]].name}}\",\n \"title\": \"ALARM\"\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":270,"wires":[["43831cb1.c86e24"]]},{"id":"d2e1add5.fcdf","type":"function","z":"68e2c049.bef26","name":"Message","func":"msg.payload =\n{\n \"data\": {\n \"message\": \"Warning! {{states[states.alarm_control_panel.house.attributes.changed_by.split(\\\".\\\")[0]][states.alarm_control_panel.house.attributes.changed_by.split(\\\".\\\")[1]].name}}\",\n \"title\": \"ALARM\"\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":310,"wires":[["c06567f2.e66a5"]]}]