Here's my spin on motion lighting with dim level adjust. Notice the unconnected (lower left) node. I tried to use actual hall illuminance but the device I was using is so crappy with it's light range and very slow to update so I went back to my previous idea of using the outside light level and assume it means something about the hall light level. When I get a better device installed (like Hubitat with Homemade Temperature, Humidity, Pressure and Light sensor which are excellent BTW) I'll go back to using hall light level.
[{"id":"28cea37b.04605c","type":"tab","label":"Upstairs Hall Motion Lighting with Dim","disabled":false,"info":""},{"id":"1e9560fd.a0617f","type":"hubitat device","z":"28cea37b.04605c","name":"Front Porch Illuminance","server":"5780d46e.3640ac","deviceId":"98","attribute":"illuminance","sendEvent":true,"x":130,"y":80,"wires":[["b61f8098.f0d67","e2f8252c.0f3678"]]},{"id":"b61f8098.f0d67","type":"range","z":"28cea37b.04605c","minin":"0","maxin":"800","minout":"15","maxout":"80","action":"clamp","round":true,"property":"payload.value","name":"Scale Luminance to Dimmer Level","x":460,"y":80,"wires":[["5b42e22d.974abc"]]},{"id":"5b42e22d.974abc","type":"function","z":"28cea37b.04605c","name":"Save Dimmer Level","func":"flow.set(\"dimmer_level\", msg.payload.value);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":750,"y":80,"wires":[[]]},{"id":"f6b51b14.d16968","type":"hubitat device","z":"28cea37b.04605c","name":"Upstairs Hall Motion","server":"7e632c0e.cc9424","deviceId":"642","attribute":"motion","sendEvent":true,"x":120,"y":240,"wires":[["9671e0c5.21f79","ec2c8101.c6e84"]]},{"id":"ea0899ad.01a438","type":"hubitat device","z":"28cea37b.04605c","name":"Upstairs Hall Illuminace","server":"5780d46e.3640ac","deviceId":"514","attribute":"illuminance","sendEvent":true,"x":130,"y":320,"wires":[[]]},{"id":"ec2c8101.c6e84","type":"gate","z":"28cea37b.04605c","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","persist":true,"x":410,"y":160,"wires":[["25c4f2da.c6bc9e","25d61660.1e0fba"]]},{"id":"d99561fa.01f7","type":"hubitat command","z":"28cea37b.04605c","name":"Set Dim Level","server":"7e632c0e.cc9424","deviceId":"194","command":"setLevel","commandArgs":"","x":760,"y":160,"wires":[[]]},{"id":"afa9ebd6.eb5608","type":"hubitat command","z":"28cea37b.04605c","name":"Turn Off","server":"5780d46e.3640ac","deviceId":"194","command":"off","commandArgs":"","x":540,"y":260,"wires":[[]]},{"id":"25c4f2da.c6bc9e","type":"function","z":"28cea37b.04605c","name":"Get Dimmer Level","func":"msg.arguments=flow.get(\"dimmer_level\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":160,"wires":[["d99561fa.01f7"]]},{"id":"a0b1b4e2.7e4d58","type":"change","z":"28cea37b.04605c","name":"Open Gate","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":140,"wires":[["ec2c8101.c6e84"]]},{"id":"e2f8252c.0f3678","type":"switch","z":"28cea37b.04605c","name":"<= 775","property":"payload.value","propertyType":"msg","rules":[{"t":"lte","v":"775","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":90,"y":160,"wires":[["a0b1b4e2.7e4d58"],["43a7d485.35c3bc"]]},{"id":"43a7d485.35c3bc","type":"change","z":"28cea37b.04605c","name":"Close Gate","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":180,"wires":[["ec2c8101.c6e84"]]},{"id":"9671e0c5.21f79","type":"trigger","z":"28cea37b.04605c","name":"Delay Off","op1":"","op2":"false","op1type":"nul","op2type":"bool","duration":"2","extend":true,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":340,"y":240,"wires":[[],["afa9ebd6.eb5608"]]},{"id":"25d61660.1e0fba","type":"hubitat command","z":"28cea37b.04605c","name":"Turn On","server":"7e632c0e.cc9424","deviceId":"194","command":"on","commandArgs":"","x":540,"y":220,"wires":[[]]},{"id":"5780d46e.3640ac","type":"hubitat config","z":"","name":"Steve's Hubitat - webhook","usetls":false,"host":"192.168.1.12","port":"80","appId":"545","nodeRedServer":"http://pvr.localdomain:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true,"useWebsocket":false},{"id":"7e632c0e.cc9424","type":"hubitat config","z":"","name":"Steve's Hubitat - websocket","usetls":false,"host":"hubitat.localdomain","port":"80","appId":"545","nodeRedServer":"http://pvr.localdomain:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":true}]