You’ve got some indentation errors, but that otherwise looks correct. Here’s code where I did something similar, using the ID of the person that disarmed the alarm to identify them in the notification. Handy to let me know when the kids get home from school and I’m not home.
note that this code was based on an earlier version of the component. Use last_disarmed_by_user now rather than last_changed_by_user.