I have LUX in all my light flows. This is my office lights, based on motion, and if LUX is less or greater than 350. It also brings Modes into it (which is a subflow).
[{"id":"a5be72f4.b867","type":"subflow","name":"GetMode","info":"","category":"","in":[{"x":120,"y":240,"wires":[{"id":"47f96bf1.d81e44"}]}],"out":[{"x":660,"y":120,"wires":[{"id":"4a08d4c2.db961c","port":0}]},{"x":660,"y":160,"wires":[{"id":"4a08d4c2.db961c","port":1}]},{"x":660,"y":200,"wires":[{"id":"4a08d4c2.db961c","port":2}]},{"x":660,"y":240,"wires":[{"id":"4a08d4c2.db961c","port":3}]},{"x":660,"y":280,"wires":[{"id":"4a08d4c2.db961c","port":4}]},{"x":660,"y":320,"wires":[{"id":"4a08d4c2.db961c","port":5}]},{"x":660,"y":360,"wires":[{"id":"4a08d4c2.db961c","port":6}]}],"env":[],"color":"#DDAA99","outputLabels":["Home","Night","Away","Roy_Home_Alone","Holiday","Cleaning_in_Progress","Evening"]},{"id":"47f96bf1.d81e44","type":"hubitat mode","z":"a5be72f4.b867","name":"Mode","server":"1100d0ca.ab596f","sendEvent":false,"x":360,"y":240,"wires":[["4a08d4c2.db961c"]]},{"id":"4a08d4c2.db961c","type":"switch","z":"a5be72f4.b867","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Home","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Away","vt":"str"},{"t":"eq","v":"Roy_Home_Alone","vt":"str"},{"t":"eq","v":"Holiday","vt":"str"},{"t":"eq","v":"Cleaning_in_Progress","vt":"str"},{"t":"eq","v":"Evening","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":510,"y":240,"wires":[[],[],[],[],[],[],[]]},{"id":"1100d0ca.ab596f","type":"hubitat config","z":"","name":"Hub_2","usetls":false,"host":"192.168.1.26","port":"80","appId":"9112","nodeRedServer":"http://192.168.1.10:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true,"useWebsocket":false},{"id":"809d663d.27f438","type":"switch","z":"5f2605eb.0069ec","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":2160,"wires":[["89b95fd9.ed92f"],["10df10e.10b3eef"]]},{"id":"4c512b5b.d019a4","type":"comment","z":"5f2605eb.0069ec","name":"Office","info":"","x":90,"y":2040,"wires":[]},{"id":"89b95fd9.ed92f","type":"hubitat device","z":"5f2605eb.0069ec","name":"LUX Sensor","server":"56b69ca1.36f034","deviceId":"64","attribute":"illuminance","sendEvent":false,"x":390,"y":2100,"wires":[["32dc3bef.357f34"]]},{"id":"32dc3bef.357f34","type":"switch","z":"5f2605eb.0069ec","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"lt","v":"350","vt":"str"},{"t":"gte","v":"350","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":2100,"wires":[["2d79572d.0b63e8","d00b1a2.3b015e8"],["5e5559e4.ab1a88"]]},{"id":"2d79572d.0b63e8","type":"subflow:a5be72f4.b867","z":"5f2605eb.0069ec","name":"","x":800,"y":2120,"wires":[["990d90ca.2f892"],["83f75e51.a0969"],[],[],[],["990d90ca.2f892"],["83f75e51.a0969"]]},{"id":"d00b1a2.3b015e8","type":"change","z":"5f2605eb.0069ec","name":"stop the timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":2160,"wires":[["10df10e.10b3eef"]]},{"id":"10df10e.10b3eef","type":"stoptimer-varidelay","z":"5f2605eb.0069ec","duration":"5","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":380,"y":2220,"wires":[["5e5559e4.ab1a88"],[],[]]},{"id":"28fdb2c9.6c67ee","type":"hubitat device","z":"5f2605eb.0069ec","name":"Office Motion Sensor","server":"56b69ca1.36f034","deviceId":"1075","attribute":"motion","sendEvent":true,"x":160,"y":2100,"wires":[["809d663d.27f438"]]},{"id":"5e5559e4.ab1a88","type":"template","z":"5f2605eb.0069ec","name":"Off","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n \"on\": false\n}","output":"json","x":570,"y":2220,"wires":[["1480cbe.2785234"]]},{"id":"1480cbe.2785234","type":"hue-light","z":"5f2605eb.0069ec","name":"Office Spots","bridge":"1b5168ed.108067","lightid":"46","colornamer":false,"skipevents":false,"x":730,"y":2220,"wires":[[]]},{"id":"990d90ca.2f892","type":"template","z":"5f2605eb.0069ec","name":"100%","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n \"brightness\": 100\n}","output":"json","x":990,"y":2100,"wires":[["63b1d4f3.327c8c"]]},{"id":"83f75e51.a0969","type":"template","z":"5f2605eb.0069ec","name":"50%","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n \"brightness\": 50\n}","output":"json","x":990,"y":2140,"wires":[["63b1d4f3.327c8c"]]},{"id":"63b1d4f3.327c8c","type":"hue-light","z":"5f2605eb.0069ec","name":"Office Spots","bridge":"1b5168ed.108067","lightid":"46","colornamer":false,"skipevents":false,"x":1150,"y":2120,"wires":[[]]},{"id":"56b69ca1.36f034","type":"hubitat config","z":"","name":"Hub_1","usetls":false,"host":"192.168.1.25","port":"80","appId":"40","nodeRedServer":"http://192.168.1.10:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false},{"id":"1b5168ed.108067","type":"hue-bridge","z":"","name":"Philips hue","bridge":"192.168.1.99","key":"f0hrZKKy8DMirr2ZTCRlBjL6PZcHP8p-AXynonj1","interval":"3000","disableupdates":false}]
Modes Subflow
[{"id":"16d98ec7.0f1cc1","type":"subflow","name":"Mode","info":"","category":"","in":[{"x":60,"y":240,"wires":[{"id":"c60bf7fc.c3d8f8"}]}],"out":[{"x":740,"y":100,"wires":[{"id":"7dec3c67.53b3d4","port":0}]},{"x":740,"y":140,"wires":[{"id":"fd0452a0.76eca","port":0}]},{"x":740,"y":180,"wires":[{"id":"69996fd3.78e94","port":0}]},{"x":740,"y":220,"wires":[{"id":"a195aa6a.7024e8","port":0}]},{"x":740,"y":260,"wires":[{"id":"74b82d79.f461a4","port":0}]},{"x":740,"y":300,"wires":[{"id":"b1e9fbd.5bc5a08","port":0}]},{"x":740,"y":340,"wires":[{"id":"fa49250b.e50708","port":0}]}],"env":[{"name":"Home","type":"str","value":""},{"name":"Night","type":"str","value":""},{"name":"Away","type":"str","value":""},{"name":"Home Alone","type":"str","value":""},{"name":"Holiday","type":"str","value":""},{"name":"Cleaning","type":"str","value":""},{"name":"Evening","type":"str","value":""}],"color":"#DDAA99"},{"id":"c60bf7fc.c3d8f8","type":"http request","z":"16d98ec7.0f1cc1","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.1.26/apps/api/9112/modes?access_token=75f004f2-f52e-4c9c-9806-2d73f792ce3f","tls":"","persist":false,"proxy":"","authType":"","x":190,"y":240,"wires":[["7602246e.aa02bc","482eddf1.067e14","eb9d8fab.7734d","29132316.172e2c","a471dcce.59b09","37eea375.e045bc","4cd1b7bf.5031c8"]]},{"id":"7602246e.aa02bc","type":"string","z":"16d98ec7.0f1cc1","name":"Home","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.0.active","propout":"payload","object":"msg","objectout":"msg","x":390,"y":100,"wires":[["7dec3c67.53b3d4"]],"outputLabels":["Home"]},{"id":"482eddf1.067e14","type":"string","z":"16d98ec7.0f1cc1","name":"Night","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.1.active","propout":"payload","object":"msg","objectout":"msg","x":390,"y":140,"wires":[["fd0452a0.76eca"]],"outputLabels":["Night"]},{"id":"eb9d8fab.7734d","type":"string","z":"16d98ec7.0f1cc1","name":"Away","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.2.active","propout":"payload","object":"msg","objectout":"msg","x":390,"y":180,"wires":[["69996fd3.78e94"]],"outputLabels":["Away"]},{"id":"29132316.172e2c","type":"string","z":"16d98ec7.0f1cc1","name":"Evening","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.6.active","propout":"payload","object":"msg","objectout":"msg","x":400,"y":340,"wires":[["fa49250b.e50708"]],"outputLabels":["Evening"]},{"id":"a471dcce.59b09","type":"string","z":"16d98ec7.0f1cc1","name":"Roy_Home_Alone","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.3.active","propout":"payload","object":"msg","objectout":"msg","x":430,"y":220,"wires":[["a195aa6a.7024e8"]],"outputLabels":["Home Alone"]},{"id":"37eea375.e045bc","type":"string","z":"16d98ec7.0f1cc1","name":"Cleaning","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.5.active","propout":"payload","object":"msg","objectout":"msg","x":400,"y":300,"wires":[["b1e9fbd.5bc5a08"]],"outputLabels":["Cleaning"]},{"id":"4cd1b7bf.5031c8","type":"string","z":"16d98ec7.0f1cc1","name":"Holiday","methods":[{"name":"delLeftMost","params":[{"type":"str","value":""}]}],"prop":"payload.4.active","propout":"payload","object":"msg","objectout":"msg","x":400,"y":260,"wires":[["74b82d79.f461a4"]],"outputLabels":["Holiday"]},{"id":"7dec3c67.53b3d4","type":"switch","z":"16d98ec7.0f1cc1","name":"Home","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":100,"wires":[[]],"outputLabels":["Home"]},{"id":"fd0452a0.76eca","type":"switch","z":"16d98ec7.0f1cc1","name":"Night","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":140,"wires":[[]],"outputLabels":["Night"]},{"id":"69996fd3.78e94","type":"switch","z":"16d98ec7.0f1cc1","name":"Away","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":180,"wires":[[]],"outputLabels":["Away"]},{"id":"a195aa6a.7024e8","type":"switch","z":"16d98ec7.0f1cc1","name":"Home Alone","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":630,"y":220,"wires":[[]],"outputLabels":["Home Alone"]},{"id":"74b82d79.f461a4","type":"switch","z":"16d98ec7.0f1cc1","name":"Holiday","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":620,"y":260,"wires":[[]],"outputLabels":["Holiday"]},{"id":"b1e9fbd.5bc5a08","type":"switch","z":"16d98ec7.0f1cc1","name":"Cleaning","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":620,"y":300,"wires":[[]],"outputLabels":["Cleaning"]},{"id":"fa49250b.e50708","type":"switch","z":"16d98ec7.0f1cc1","name":"Evening","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":620,"y":340,"wires":[[]],"outputLabels":["Evening"]}]