Do you receive 2 messages from the homekit node ? or are these messages in 1 payload msg ?
If they are 2 separate messages you try this flow, it may look a bit convoluted, but it joins the 2 together and creates it into a new message.
Flow
[{"id":"aaee9eac.c4f39","type":"inject","z":"398759ce.1de6b6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{ \"On\": true }","payloadType":"json","x":490,"y":140,"wires":[["fe6d0da8.7a946"]]},{"id":"5fd8087a.b76f8","type":"debug","z":"398759ce.1de6b6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":160,"wires":[]},{"id":"fe6d0da8.7a946","type":"join","z":"398759ce.1de6b6","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":650,"y":160,"wires":[["be25339a.d6c9f"]]},{"id":"9e279193.430d68","type":"inject","z":"398759ce.1de6b6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{ \"Brightness\": 45 }","payloadType":"json","x":470,"y":180,"wires":[["fe6d0da8.7a946"]]},{"id":"be25339a.d6c9f","type":"change","z":"398759ce.1de6b6","name":"create shelly msg","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t\"light\":0,\t\"on\":payload.On,\t\"brightness\":payload.Brightness\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":160,"wires":[["5fd8087a.b76f8"]]}]
edit - complicated mind - simplified now