I figured it out. It was a matter of me not fully understanding node-red. The trick was to create the payload just like I was. No problems with the function node. But in the call service node, the trick was to fill out the fields like this:
Domain: elkm1
Service: alarm_display_message
Entity ID: alarm_control_panel.home
Data:
{
"line1": "{{payload.line1}}",
"line2": "{{payload.line2}}",
"clear": "{{payload.clear}}",
"beep": "{{payload.beep}}",
"timeout": "{{payload.timeout}}"
}
Thanks for the help!!!
Here’s the whole flow, if anyone wants it.
[{"id":"950a7e3b.2f98c","type":"api-call-service","z":"f261dcc3.e0057","name":"Display the weather","server":"3e7f7522.9e5aea","version":1,"debugenabled":true,"service_domain":"elkm1","service":"alarm_display_message","entityId":"alarm_control_panel.home","data":"{ \"line1\": \"{{payload.line1}}\", \"line2\": \"{{payload.line2}}\", \"clear\": \"{{payload.clear}}\", \"beep\": \"{{payload.beep}}\", \"timeout\": \"{{payload.timeout}}\" }","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":340,"wires":[["9a6475a3.0b8e98"]]},{"id":"3e7f7522.9e5aea","type":"server","name":"Home Assistant","addon":true}]