You would either store the values in context storage or use a join node. As to best practice that is different for everyone
Here is a join node example.
[{"id":"677f8ec2.78e86","type":"join","z":"e4f02345.29fe9","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":350,"y":880,"wires":[["9a56495c.3499d"]]},{"id":"5cd6d99c.939ca","type":"inject","z":"e4f02345.29fe9","name":"light level35","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"lightlevel","payload":"35","payloadType":"num","x":130,"y":920,"wires":[["677f8ec2.78e86"]]},{"id":"214286e5.05cc42","type":"inject","z":"e4f02345.29fe9","name":"light level100","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"lightlevel","payload":"100","payloadType":"num","x":140,"y":960,"wires":[["677f8ec2.78e86"]]},{"id":"9a56495c.3499d","type":"change","z":"e4f02345.29fe9","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"(payload.lightlevel >50 and payload.motion = 1) ? 1 : 0","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":880,"wires":[["ff247f5b.7935b"]]},{"id":"b02c2f39.af5328","type":"change","z":"e4f02345.29fe9","name":"send complete on motion","rules":[{"t":"set","p":"complete","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":820,"wires":[["677f8ec2.78e86"]]},{"id":"ff247f5b.7935b","type":"debug","z":"e4f02345.29fe9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":880,"wires":[]},{"id":"22545677.0e6e0a","type":"inject","z":"e4f02345.29fe9","name":"motion 0","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"motion","payload":"0","payloadType":"num","x":110,"y":820,"wires":[["b02c2f39.af5328"]]},{"id":"64af2594.e2d08c","type":"inject","z":"e4f02345.29fe9","name":"motion 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"motion","payload":"1","payloadType":"num","x":110,"y":860,"wires":[["b02c2f39.af5328"]]}]