Help with node-red dimmer function

I am fairly new to HA and Node-Red, I have done a ton of reading, and I think what I am trying to do should work, but my guess is I have one small thing incorrect. Basically I am trying to set the dim level on a light from node-red. The light turns on, but the dim level doesn’t pass through from what I can tell.
Here is my flow:


Here is the flow txt:
[{“id”:“ec7d7908.03e458”,“type”:“inject”,“z”:“7f5a232.5f2e2dc”,“name”:"",“topic”:"",“payload”:“Dim Lights”,“payloadType”:“str”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:340,“y”:870,“wires”:[[“e80c00bf.1211e”]]},{“id”:“225f2dbb.7893d2”,“type”:“template”,“z”:“7f5a232.5f2e2dc”,“name”:"",“field”:“payload”,“fieldType”:“msg”,“format”:“handlebars”,“syntax”:“mustache”,“template”:"{\n “brightness_pct”: {{brightness}}\n }",“output”:“str”,“x”:750,“y”:870,“wires”:[[“1f08b00a.7a3f1”,“fc4a36c2.e65cf8”]]},{“id”:“e80c00bf.1211e”,“type”:“change”,“z”:“7f5a232.5f2e2dc”,“name”:"",“rules”:[{“t”:“set”,“p”:“brightness”,“pt”:“msg”,“to”:“24”,“tot”:“str”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:530,“y”:870,“wires”:[[“225f2dbb.7893d2”]]},{“id”:“fc4a36c2.e65cf8”,“type”:“debug”,“z”:“7f5a232.5f2e2dc”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“targetType”:“full”,“x”:1090,“y”:850,“wires”:[]},{“id”:“1f08b00a.7a3f1”,“type”:“api-call-service”,“z”:“7f5a232.5f2e2dc”,“name”:"",“server”:“65b61d5d.d1e1c4”,“service_domain”:“light”,“service”:“turn_on”,“data”:"{“entity_id”:“light.home_theater_front_left”}",“mergecontext”:"",“output_location”:“payload”,“output_location_type”:“msg”,“x”:940,“y”:910,“wires”:[[“fc4a36c2.e65cf8”]]},{“id”:“65b61d5d.d1e1c4”,“type”:“server”,“z”:"",“name”:“Home Assistant”,“legacy”:false,“hassio”:false,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true}]

And here are the debug outputs:
image

Any help would be greatly appreciated.

Thanks,

So after lots of trial and error setting this in the Data field worked, however I thought that if I built it with a template it would pass into data from the msg.payload?

image