Here's my circadian lighting routine, and an example motion/auto lighting on/off which takes account of the circadian lighting and various other settings/switches to control lighting nicely.
Main routine to calculate the circadian level and temp. Having coded this in HE RM I can tell you that this is significantly easier here in NR once I figured it out. Basically there are 2 entry points - one that kicks off at sunrise to start adjusting the temp and levels up, and one that kicks off at golden hour (I have no idea when that is, but it sounded cool and works fine after a negative adjustment). The nodes automatically know these times because you put in the lat/long for your location (I'm in Thailand as most of you know already). Now, for the evening calculation, I wanted the routine to start to dim the lights around golden-hour or sunset-ish, and then continue doing this until 11pm at night. So to achieve this the trick was simply to rotate my location back around the globe by (if I recall correctly) 90 degrees in order to move the dimming to be completed at around 11pm instead of sunset. This is easy by just negatively adjusting the latitude. Maybe there's a better way, but this works perfectly
export
[{"id":"5922aeac.ae77d","type":"tab","label":"Circadian Lighting","disabled":false,"info":""},{"id":"eaf3ab0e.341f98","type":"group","z":"5922aeac.ae77d","name":"Set CIrcadian Level & Temp based on time","style":{"stroke":"#a4a4a4","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["b4d298f.a97b368","803cb2f.f15a95","e5d00af3.2f7198","1a3938ca.1ebd47","6274d1fb.0fe6","3dda5d7f.ac3af2","9529d7f6.349d08","8165af44.0c5dd","45023eb7.f2946","bf55ca34.dd67a8","3e6b4de9.1c9912","38f1a174.65dace","e8f609dc.f0d5f8","3f1e19fe.3a2996","5f91c9f6.b08ec8","76007c2d.a93864","b9722122.0d8e3","cf604400.559ce8","314aeeb.0acd312","6a98a34e.6dc68c","3b36eca6.3a74c4","365edf68.072c3","d2ee3b3a.a3eef8","fe4817df.1011e8"],"x":34,"y":319,"w":1128,"h":449},{"id":"b9a20a5c.d622c8","type":"suncron","z":"5922aeac.ae77d","name":"sunrise","lat":"12.809222","lon":"100.914550","replay":false,"ejectScheduleOnUpdate":false,"sunrisePayload":"sunrise","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":160,"y":200,"wires":[["8fae56de.34be88"]]},{"id":"18a3bbd7.690224","type":"suncron","z":"5922aeac.ae77d","name":"noon","lat":"12.809222","lon":"100.914550","replay":true,"ejectScheduleOnUpdate":false,"sunrisePayload":"","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"noon","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":170,"y":280,"wires":[["39b4d8e6.cffd98"]]},{"id":"97b7b4ea.44f528","type":"suncron","z":"5922aeac.ae77d","name":"sunset","lat":"12.809222","lon":"100.914550","replay":false,"ejectScheduleOnUpdate":false,"sunrisePayload":"","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"sunset","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":170,"y":120,"wires":[["3f953327.35fb4c"]]},{"id":"8fae56de.34be88","type":"change","z":"5922aeac.ae77d","name":"Set Circadian Temp/Level","rules":[{"t":"set","p":"circadianTemp","pt":"global","to":"2000","tot":"num"},{"t":"set","p":"circadianLevel","pt":"global","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":200,"wires":[[]]},{"id":"b4d298f.a97b368","type":"Circadian Light","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","lat":"12.809222","lon":"100.914550","period":"2","topic":"","name":"","x":120,"y":360,"wires":[["e5d00af3.2f7198"]]},{"id":"803cb2f.f15a95","type":"function","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Calculate Circadian Values","func":"var percentCircadian = msg.payload.percent;\nglobal.set("circadianTemp",500-(3.46percentCircadian));\nglobal.set("circadianLevel",(0.70percentCircadian)+8);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":600,"y":360,"wires":[["fe4817df.1011e8"]]},{"id":"e5d00af3.2f7198","type":"time-range-switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Morning Circadian Cycle","lat":"12.809222","lon":"100.914550","startTime":"sunrise","endTime":"solarNoon","startOffset":0,"endOffset":0,"x":330,"y":360,"wires":[["803cb2f.f15a95"],[]]},{"id":"1a3938ca.1ebd47","type":"function","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Calculate Circadian Values","func":"var percentCircadian = msg.payload.percent;\nglobal.set("circadianTemp",500-(3.46percentCircadian));\nglobal.set("circadianLevel",(0.70percentCircadian)+8);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":600,"y":420,"wires":[["fe4817df.1011e8"]]},{"id":"6274d1fb.0fe6","type":"time-range-switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Evening Circadian Cycle","lat":"12.809222","lon":"100.914550","startTime":"goldenHour","endTime":"night","startOffset":0,"endOffset":"180","x":330,"y":436,"wires":[["1a3938ca.1ebd47"],[]]},{"id":"3f953327.35fb4c","type":"change","z":"5922aeac.ae77d","d":true,"name":"Set Circadian Temp/Level","rules":[{"t":"set","p":"circadianTemp","pt":"global","to":"6000","tot":"num"},{"t":"set","p":"circadianLevel","pt":"global","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":120,"wires":[[]]},{"id":"39b4d8e6.cffd98","type":"change","z":"5922aeac.ae77d","d":true,"name":"Set Circadian Temp/Level","rules":[{"t":"set","p":"circadianTemp","pt":"global","to":"6000","tot":"num"},{"t":"set","p":"circadianLevel","pt":"global","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":280,"wires":[[]]},{"id":"3dda5d7f.ac3af2","type":"switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":726,"wires":[["8165af44.0c5dd"],[]]},{"id":"9529d7f6.349d08","type":"hubitat device","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Kitchen Lights","server":"a626e778.3c46e8","deviceId":"1825","attribute":"switch","sendEvent":true,"x":460,"y":726,"wires":[["3dda5d7f.ac3af2"]]},{"id":"8165af44.0c5dd","type":"change","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"","rules":[{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload,colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":847,"y":727,"wires":[["45023eb7.f2946"]]},{"id":"45023eb7.f2946","type":"hue-group","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Kitchen","bridge":"74cddefe.a3a54","groupid":"8","colornamer":true,"skipevents":false,"x":1027,"y":727,"wires":[[]]},{"id":"bf55ca34.dd67a8","type":"switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":546,"wires":[["38f1a174.65dace"],[]]},{"id":"3e6b4de9.1c9912","type":"hubitat device","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Landing Lights","server":"a626e778.3c46e8","deviceId":"1828","attribute":"switch","sendEvent":true,"x":460,"y":546,"wires":[["bf55ca34.dd67a8"]]},{"id":"38f1a174.65dace","type":"change","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"","rules":[{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload,colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":847,"y":547,"wires":[["e8f609dc.f0d5f8","365edf68.072c3"]]},{"id":"e8f609dc.f0d5f8","type":"hue-group","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Landing","bridge":"74cddefe.a3a54","groupid":"7","colornamer":true,"skipevents":false,"x":1027,"y":547,"wires":[[]]},{"id":"3f1e19fe.3a2996","type":"switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":666,"wires":[["76007c2d.a93864"],[]]},{"id":"5f91c9f6.b08ec8","type":"hubitat device","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Living Room Lights","server":"a626e778.3c46e8","deviceId":"1826","attribute":"switch","sendEvent":true,"x":471,"y":667,"wires":[["3f1e19fe.3a2996"]]},{"id":"76007c2d.a93864","type":"change","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"","rules":[{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload,colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":847,"y":667,"wires":[["b9722122.0d8e3"]]},{"id":"b9722122.0d8e3","type":"hue-group","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Living room","bridge":"74cddefe.a3a54","groupid":"2","colornamer":true,"skipevents":false,"x":1037,"y":667,"wires":[[]]},{"id":"cf604400.559ce8","type":"switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":606,"wires":[["6a98a34e.6dc68c"],[]]},{"id":"314aeeb.0acd312","type":"hubitat device","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Master Bedroom Lights","server":"a626e778.3c46e8","deviceId":"1827","attribute":"switch","sendEvent":true,"x":489,"y":606,"wires":[["cf604400.559ce8"]]},{"id":"6a98a34e.6dc68c","type":"change","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"","rules":[{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload,colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":846,"y":607,"wires":[["3b36eca6.3a74c4"]]},{"id":"3b36eca6.3a74c4","type":"hue-group","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Master Bedroom","bridge":"74cddefe.a3a54","groupid":"1","colornamer":true,"skipevents":false,"x":1046,"y":607,"wires":[[]]},{"id":"365edf68.072c3","type":"hue-group","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"Stairwell","bridge":"74cddefe.a3a54","groupid":"10","colornamer":true,"skipevents":false,"x":1029,"y":491,"wires":[[]]},{"id":"2b9b1c3a.31f404","type":"inject","z":"5922aeac.ae77d","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":60,"wires":[["6efce393.512cec"]]},{"id":"d2ee3b3a.a3eef8","type":"Circadian Light","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","lat":"12.809222","lon":"35.914550","period":"2","topic":"","name":"","x":120,"y":436,"wires":[["6274d1fb.0fe6"]]},{"id":"fe4817df.1011e8","type":"switch","z":"5922aeac.ae77d","g":"eaf3ab0e.341f98","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":190,"y":646,"wires":[["3e6b4de9.1c9912","314aeeb.0acd312","5f91c9f6.b08ec8","9529d7f6.349d08"]]},{"id":"6efce393.512cec","type":"change","z":"5922aeac.ae77d","name":"Set Circadian Temp/Level","rules":[{"t":"set","p":"circadianTemp","pt":"global","to":"153","tot":"num"},{"t":"set","p":"circadianLevel","pt":"global","to":"78","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":60,"wires":[[]]},{"id":"a626e778.3c46e8","type":"hubitat config","z":"","name":"myHubitat","usetls":false,"host":"192.168.0.167","port":"80","appId":"2628","nodeRedServer":"http://192.168.0.185:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":true},{"id":"74cddefe.a3a54","type":"hue-bridge","z":"","name":"Ban Amphur Home","bridge":"192.168.0.147","key":"DtEvS2kGBQEoqFOuhWANUh0R2ZpEVmd-Qocp14mi","interval":"1000","disableupdates":false}]
Then here's the motion/auto on/off lighting routine. I've created one of these for each room/area of the house. It will automatically update the room's lighting to the appropriate temp/level based on the global context variables set in the circadian routine above and the time of day. It does this every 2 minutes and the change is imperceptible which is perfect for a smooth lighting change. But also it will respond to switches set in HE to control:
In this example, I have 2 motion sensors to trigger the lights on/off, and in addition I'm using 3 virtual motion sensors connected to a Samsung Camera for cancelling the lights off (on recognition of motion, person, or face using tinyCAM AI motion/object tracking app)
export
[{"id":"26b8e1d1.fffdfe","type":"tab","label":"Auto Lighting","disabled":false,"info":""},{"id":"2f685de9.9ff732","type":"group","z":"26b8e1d1.fffdfe","name":"Auto Lighting - Master Bedroom","style":{"stroke":"#999999","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["85cff0c1.55c1e","4a5d77c2.aac1b8","3dacbfe5.3f11b","713ac00e.252cf","328182fc.fd34fe","a7bcb3c8.67e52","180b1ada.c0a095","98ffcca7.c5eae","4693478d.891008","51642b1e.c039f4","e028a3ef.df608","81be9462.62c978","7da0cc38.eff5e4","cb673c74.f16ce","5135042d.1c45cc","68022d28.fd07b4","91fe57b4.0f4128","42666aaa.62db84","d193ea54.c30af8","445bb241.48ce0c","bf826a9f.824848","9cd6baba.fe8428","c9eb1442.2b4f68","c2641fc.322cbe","cf591ecd.012a2","3ee00e59.6b4a62","600a3a5c.2bb5d4","c7d9bc76.4bb86","4bdc3801.ad46b8","61ba0c5.dbab7f4"],"x":34,"y":1639,"w":2052,"h":402},{"id":"8f6a0022.0dc0c","type":"group","z":"26b8e1d1.fffdfe","name":"Auto Lighting - Kitchen","style":{"stroke":"#999999","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["418722aa.50bc6c","76d6c89d.605c18","aa5fccaf.bf14f","41bd25d6.e8f9fc","309366e4.82750a","3123c79e.f05688","797958ae.2f36c8","6a8f2585.4e11ec","5fd992ff.6a723c","ef0a9631.a669d8","a819c53a.84afc8","c7318036.156f1","e8f0e15c.2279a","c2ac8589.4be998","78cd4451.e7536c","f2150808.bba258","cfa9b114.148f4","7927c2ae.368abc"],"x":34,"y":79,"w":1632,"h":322},{"id":"a9f8eb5d.d40eb8","type":"group","z":"26b8e1d1.fffdfe","name":"Auto Lighting - Landing & Stairwell","style":{"stroke":"#999999","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["cff30ea9.5fb2f","50397691.1a3228","1aa57c74.f70964","f7fd6c63.a2333","8c54694e.eca328","14d60f6.c762ef1","2080d1f.207c42e","cee8a59b.8caaf8","df7d2027.5c60a","5e31e29.e743b1c","6c255d6e.09f6f4","76412e3f.9871d","aaaf5361.ebaae","af66954a.6bef48","3d1bf81d.435f78","5b0b3a48.50dbe4","43c16a96.d36124","4db43a8a.1a3f84"],"x":34,"y":459,"w":1632,"h":302},{"id":"e0d832d5.9667d","type":"group","z":"26b8e1d1.fffdfe","name":"Auto Lighting - Terrace","style":{"stroke":"#999999","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["24807790.259448","7d18af53.9f74b","ed68388e.a89f28","d83f6ca2.dfafe","9a0e3b5f.18dd98","f06f8364.cd7bc","39d1f0a8.27293","7e314e85.f9daa","c93fe564.db27b8","f0d8655b.646538","19ee008b.38ae7f","dc31c880.38a178","85d5ef90.c9d18","c44bdf70.8dac1"],"x":34,"y":819,"w":1632,"h":322},{"id":"f7d687c1.f15668","type":"group","z":"26b8e1d1.fffdfe","name":"Auto Lighting - Living Room","style":{"stroke":"#999999","fill":"#bfdbef","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["ad58b78.b0a4148","adc864a1.e864b8","85ec4646.5e0818","9411e778.d79168","92c28706.eb9b38","61c6354f.89790c","b63e76c0.db1eb8","f4364047.a899f","19eef6b8.b3d319","4a089150.569a1","5ce76a1e.a56094","2acb6479.1e5d2c","f7c9b703.d33b38","b37c2cdd.49a6","82d2878b.400558","ef0b25a6.d76848","5ee9b5fc.75521c","acf828cf.a4fc28","37a191f3.7e0a3e"],"x":34,"y":1159,"w":1712,"h":422},{"id":"418722aa.50bc6c","type":"switch","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"active/inactive","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":260,"wires":[["aa5fccaf.bf14f","f2150808.bba258"],["76d6c89d.605c18"]]},{"id":"76d6c89d.605c18","type":"stoptimer-varidelay","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","duration":"5","durationType":"num","units":"Minute","payloadtype":"str","payloadval":"","name":"","reporting":"every_second","persist":true,"x":660,"y":300,"wires":[["3123c79e.f05688"],[],[]]},{"id":"aa5fccaf.bf14f","type":"change","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":360,"wires":[["76d6c89d.605c18"]]},{"id":"41bd25d6.e8f9fc","type":"switch","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Evening/Night/Day","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Day","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":870,"y":180,"wires":[["5fd992ff.6a723c"],["5fd992ff.6a723c"],["309366e4.82750a"]]},{"id":"309366e4.82750a","type":"switch","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Daytime Lights","property":"daytimeLights","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1040,"y":240,"wires":[["5fd992ff.6a723c"]]},{"id":"3123c79e.f05688","type":"switch","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Motion Lights Auto Off","property":"lightsMotionOff","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":900,"y":300,"wires":[["c7318036.156f1"]]},{"id":"797958ae.2f36c8","type":"hue-group","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Kitchen","bridge":"74cddefe.a3a54","groupid":"8","colornamer":true,"skipevents":false,"x":1580,"y":160,"wires":[[]]},{"id":"6a8f2585.4e11ec","type":"hue-group","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Kitchen","bridge":"74cddefe.a3a54","groupid":"8","colornamer":true,"skipevents":false,"x":1340,"y":300,"wires":[[]]},{"id":"cff30ea9.5fb2f","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Xiaomi Motion - Landing 2","server":"a626e778.3c46e8","deviceId":"868","attribute":"motion","sendEvent":true,"x":170,"y":660,"wires":[["50397691.1a3228"]]},{"id":"50397691.1a3228","type":"switch","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"active/inactive","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":420,"y":600,"wires":[["8c54694e.eca328","14d60f6.c762ef1"],["f7fd6c63.a2333"]]},{"id":"1aa57c74.f70964","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Xiaomi Motion - Stairs","server":"a626e778.3c46e8","deviceId":"801","attribute":"motion","sendEvent":true,"x":160,"y":540,"wires":[["50397691.1a3228"]]},{"id":"f7fd6c63.a2333","type":"stoptimer-varidelay","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","duration":"5","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":660,"y":660,"wires":[["5e31e29.e743b1c"],[],[]]},{"id":"8c54694e.eca328","type":"change","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":720,"wires":[["f7fd6c63.a2333"]]},{"id":"14d60f6.c762ef1","type":"hubitat mode","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Evening/Night","server":"a626e778.3c46e8","sendEvent":false,"x":660,"y":540,"wires":[["2080d1f.207c42e"]]},{"id":"2080d1f.207c42e","type":"switch","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Evening/Night/Day","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Day","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":850,"y":540,"wires":[["5b0b3a48.50dbe4"],["5b0b3a48.50dbe4"],["cee8a59b.8caaf8"]]},{"id":"cee8a59b.8caaf8","type":"switch","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Daytime Lights","property":"daytimeLights","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1020,"y":600,"wires":[["5b0b3a48.50dbe4"]]},{"id":"df7d2027.5c60a","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Xiaomi Motion - Landing 1","server":"a626e778.3c46e8","deviceId":"802","attribute":"motion","sendEvent":true,"x":170,"y":600,"wires":[["50397691.1a3228"]]},{"id":"5e31e29.e743b1c","type":"switch","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Motion Lights Auto Off","property":"lightsMotionOff","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":900,"y":660,"wires":[["4db43a8a.1a3f84"]]},{"id":"6c255d6e.09f6f4","type":"hue-group","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Landing","bridge":"74cddefe.a3a54","groupid":"7","colornamer":true,"skipevents":false,"x":1580,"y":560,"wires":[[]]},{"id":"76412e3f.9871d","type":"change","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1350,"y":540,"wires":[["6c255d6e.09f6f4","af66954a.6bef48"]]},{"id":"aaaf5361.ebaae","type":"hue-group","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Landing","bridge":"74cddefe.a3a54","groupid":"7","colornamer":true,"skipevents":false,"x":1360,"y":680,"wires":[[]]},{"id":"af66954a.6bef48","type":"hue-group","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Stairwell","bridge":"74cddefe.a3a54","groupid":"10","colornamer":true,"skipevents":false,"x":1580,"y":500,"wires":[[]]},{"id":"3d1bf81d.435f78","type":"hue-group","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"Stairwell","bridge":"74cddefe.a3a54","groupid":"10","colornamer":true,"skipevents":false,"x":1360,"y":620,"wires":[[]]},{"id":"24807790.259448","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Xiaomi Motion - Terrace","server":"a626e778.3c46e8","deviceId":"1672","attribute":"motion","sendEvent":true,"x":170,"y":1000,"wires":[["7d18af53.9f74b"]]},{"id":"7d18af53.9f74b","type":"switch","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"active/inactive","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":1000,"wires":[["d83f6ca2.dfafe","9a0e3b5f.18dd98"],["ed68388e.a89f28"]]},{"id":"ed68388e.a89f28","type":"stoptimer-varidelay","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","duration":"10","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":640,"y":1040,"wires":[["7e314e85.f9daa"],[],[]]},{"id":"d83f6ca2.dfafe","type":"change","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1100,"wires":[["ed68388e.a89f28"]]},{"id":"9a0e3b5f.18dd98","type":"hubitat mode","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Evening/Night","server":"a626e778.3c46e8","sendEvent":false,"x":640,"y":940,"wires":[["f06f8364.cd7bc"]]},{"id":"f06f8364.cd7bc","type":"switch","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Evening/Night/Day","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Day","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":870,"y":920,"wires":[["19ee008b.38ae7f"],["19ee008b.38ae7f"],["39d1f0a8.27293"]]},{"id":"39d1f0a8.27293","type":"switch","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Daytime Lights","property":"daytimeLights","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1060,"y":980,"wires":[["19ee008b.38ae7f"]]},{"id":"7e314e85.f9daa","type":"switch","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Motion Lights Auto Off","property":"lightsMotionOff","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":880,"y":1040,"wires":[["c44bdf70.8dac1"]]},{"id":"c93fe564.db27b8","type":"hue-group","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Terrace","bridge":"74cddefe.a3a54","groupid":"4","colornamer":true,"skipevents":false,"x":1580,"y":900,"wires":[[]]},{"id":"f0d8655b.646538","type":"hue-group","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"Terrace","bridge":"74cddefe.a3a54","groupid":"4","colornamer":true,"skipevents":false,"x":1360,"y":1040,"wires":[[]]},{"id":"43c16a96.d36124","type":"change","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":500,"wires":[["af66954a.6bef48","6c255d6e.09f6f4"]]},{"id":"5b0b3a48.50dbe4","type":"switch","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1150,"y":520,"wires":[["43c16a96.d36124"],["76412e3f.9871d"]]},{"id":"5fd992ff.6a723c","type":"switch","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1170,"y":160,"wires":[["a819c53a.84afc8"],["ef0a9631.a669d8"]]},{"id":"a819c53a.84afc8","type":"change","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":120,"wires":[["797958ae.2f36c8"]]},{"id":"ef0a9631.a669d8","type":"change","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":180,"wires":[["797958ae.2f36c8"]]},{"id":"19ee008b.38ae7f","type":"switch","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1170,"y":900,"wires":[["85d5ef90.c9d18"],["dc31c880.38a178"]]},{"id":"85d5ef90.c9d18","type":"change","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":860,"wires":[["c93fe564.db27b8"]]},{"id":"dc31c880.38a178","type":"change","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":920,"wires":[["c93fe564.db27b8"]]},{"id":"c7318036.156f1","type":"change","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"set off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":300,"wires":[["6a8f2585.4e11ec"]]},{"id":"4db43a8a.1a3f84","type":"change","z":"26b8e1d1.fffdfe","g":"a9f8eb5d.d40eb8","name":"set off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":660,"wires":[["3d1bf81d.435f78","aaaf5361.ebaae"]]},{"id":"c44bdf70.8dac1","type":"change","z":"26b8e1d1.fffdfe","g":"e0d832d5.9667d","name":"set off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1127,"y":1040,"wires":[["f0d8655b.646538"]]},{"id":"e8f0e15c.2279a","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Xiaomi Motion - Kitchen","server":"a626e778.3c46e8","deviceId":"867","attribute":"motion","sendEvent":true,"x":170,"y":300,"wires":[["418722aa.50bc6c"]]},{"id":"c2ac8589.4be998","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Xiaomi Motion - Kitchen table","server":"a626e778.3c46e8","deviceId":"1601","attribute":"motion","sendEvent":true,"x":180,"y":240,"wires":[["418722aa.50bc6c"]]},{"id":"78cd4451.e7536c","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Xiaomi Motion - Front Door (inside)","server":"a626e778.3c46e8","deviceId":"804","attribute":"motion","sendEvent":true,"x":200,"y":180,"wires":[["418722aa.50bc6c"]]},{"id":"f2150808.bba258","type":"hubitat mode","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"Evening/Night","server":"a626e778.3c46e8","sendEvent":false,"x":670,"y":180,"wires":[["41bd25d6.e8f9fc"]]},{"id":"ad58b78.b0a4148","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Xiaomi Motion - Living Room 1","server":"a626e778.3c46e8","deviceId":"865","attribute":"motion","sendEvent":true,"x":190,"y":1240,"wires":[["adc864a1.e864b8"]]},{"id":"adc864a1.e864b8","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"active/inactive","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":1260,"wires":[["9411e778.d79168","92c28706.eb9b38"],["85ec4646.5e0818"]]},{"id":"85ec4646.5e0818","type":"stoptimer-varidelay","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","duration":"5","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":700,"y":1380,"wires":[["f4364047.a899f"],[],[]]},{"id":"9411e778.d79168","type":"change","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":1420,"wires":[["85ec4646.5e0818"]]},{"id":"92c28706.eb9b38","type":"hubitat mode","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Evening/Night","server":"a626e778.3c46e8","sendEvent":false,"x":700,"y":1280,"wires":[["61c6354f.89790c"]]},{"id":"61c6354f.89790c","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Evening/Night/Day","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Day","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":930,"y":1260,"wires":[["5ce76a1e.a56094"],["5ce76a1e.a56094"],["b63e76c0.db1eb8"]]},{"id":"b63e76c0.db1eb8","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Daytime Lights","property":"daytimeLights","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1120,"y":1320,"wires":[["5ce76a1e.a56094"]]},{"id":"f4364047.a899f","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Motion Lights Auto Off","property":"lightsMotionOff","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":1380,"wires":[["b37c2cdd.49a6"]]},{"id":"19eef6b8.b3d319","type":"hue-group","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Living room","bridge":"74cddefe.a3a54","groupid":"2","colornamer":true,"skipevents":false,"x":1650,"y":1240,"wires":[[]]},{"id":"4a089150.569a1","type":"hue-group","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Living room","bridge":"74cddefe.a3a54","groupid":"2","colornamer":true,"skipevents":false,"x":1430,"y":1380,"wires":[[]]},{"id":"5ce76a1e.a56094","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1230,"y":1240,"wires":[["f7c9b703.d33b38"],["2acb6479.1e5d2c"]]},{"id":"2acb6479.1e5d2c","type":"change","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":1260,"wires":[["19eef6b8.b3d319"]]},{"id":"f7c9b703.d33b38","type":"change","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1460,"y":1200,"wires":[["19eef6b8.b3d319"]]},{"id":"b37c2cdd.49a6","type":"change","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"set off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1187,"y":1380,"wires":[["4a089150.569a1"]]},{"id":"ef0b25a6.d76848","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Xiaomi Motion - Living Room 2","server":"a626e778.3c46e8","deviceId":"866","attribute":"motion","sendEvent":true,"x":190,"y":1300,"wires":[["adc864a1.e864b8"]]},{"id":"82d2878b.400558","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Samsung Camera - Motion","server":"a626e778.3c46e8","deviceId":"2307","attribute":"motion","sendEvent":true,"x":180,"y":1420,"wires":[["acf828cf.a4fc28"]]},{"id":"37a191f3.7e0a3e","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Samsung Camera - Person","server":"a626e778.3c46e8","deviceId":"2446","attribute":"motion","sendEvent":true,"x":180,"y":1480,"wires":[["acf828cf.a4fc28"]]},{"id":"5ee9b5fc.75521c","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"Samsung Camera - Face","server":"a626e778.3c46e8","deviceId":"2448","attribute":"motion","sendEvent":true,"x":170,"y":1540,"wires":[["acf828cf.a4fc28"]]},{"id":"acf828cf.a4fc28","type":"switch","z":"26b8e1d1.fffdfe","g":"f7d687c1.f15668","name":"active","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":450,"y":1500,"wires":[["9411e778.d79168"]]},{"id":"cfa9b114.148f4","type":"inject","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"on","props":[{"p":"payload.on","v":"true","vt":"bool"},{"p":"payload.brightness","v":"circadianLevel","vt":"global"},{"p":"payload.colorTemp","v":"circadianTemp","vt":"global"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":1510,"y":280,"wires":[["797958ae.2f36c8"]]},{"id":"85cff0c1.55c1e","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"active/inactive","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":1900,"wires":[["3dacbfe5.3f11b","cb673c74.f16ce"],["4a5d77c2.aac1b8"]]},{"id":"4a5d77c2.aac1b8","type":"stoptimer-varidelay","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","duration":"5","durationType":"num","units":"Minute","payloadtype":"str","payloadval":"","name":"","reporting":"every_second","persist":true,"x":680,"y":1940,"wires":[["a7bcb3c8.67e52"],[],[]]},{"id":"3dacbfe5.3f11b","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":2000,"wires":[["4a5d77c2.aac1b8"]]},{"id":"713ac00e.252cf","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Evening/Night/Day","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Day","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":890,"y":1820,"wires":[["98ffcca7.c5eae"],["98ffcca7.c5eae"],["328182fc.fd34fe"]]},{"id":"328182fc.fd34fe","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Daytime Lights","property":"daytimeLights","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1060,"y":1880,"wires":[["98ffcca7.c5eae"]]},{"id":"a7bcb3c8.67e52","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Motion Lights Auto Off","property":"lightsMotionOff","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":920,"y":1940,"wires":[["e028a3ef.df608"]]},{"id":"180b1ada.c0a095","type":"hue-group","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Master Bedroom","bridge":"74cddefe.a3a54","groupid":"1","colornamer":true,"skipevents":false,"x":1380,"y":1940,"wires":[[]]},{"id":"98ffcca7.c5eae","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"CIrcadian LIghting on/off","property":"circadianLighting","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1190,"y":1800,"wires":[["3ee00e59.6b4a62","c2641fc.322cbe"],["5135042d.1c45cc","91fe57b4.0f4128"]]},{"id":"4693478d.891008","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":1720,"wires":[["445bb241.48ce0c","bf826a9f.824848"]]},{"id":"51642b1e.c039f4","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":1680,"wires":[["445bb241.48ce0c","bf826a9f.824848"]]},{"id":"e028a3ef.df608","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"set off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":1940,"wires":[["180b1ada.c0a095"]]},{"id":"81be9462.62c978","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Xiaomi Motion - Master Bedroom 2","server":"a626e778.3c46e8","deviceId":"1633","attribute":"motion","sendEvent":true,"x":200,"y":1940,"wires":[["85cff0c1.55c1e"]]},{"id":"7da0cc38.eff5e4","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Xiaomi Motion - Master Bedroom 1","server":"a626e778.3c46e8","deviceId":"803","attribute":"motion","sendEvent":true,"x":200,"y":1860,"wires":[["85cff0c1.55c1e"]]},{"id":"cb673c74.f16ce","type":"hubitat mode","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Evening/Night","server":"a626e778.3c46e8","sendEvent":false,"x":690,"y":1820,"wires":[["713ac00e.252cf","c7d9bc76.4bb86"]]},{"id":"5135042d.1c45cc","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Angus in bed","server":"a626e778.3c46e8","deviceId":"6","attribute":"switch","sendEvent":false,"x":1410,"y":1820,"wires":[["68022d28.fd07b4"]]},{"id":"68022d28.fd07b4","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"off","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1550,"y":1820,"wires":[["61ba0c5.dbab7f4"]]},{"id":"91fe57b4.0f4128","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Rein in bed","server":"a626e778.3c46e8","deviceId":"7","attribute":"switch","sendEvent":false,"x":1410,"y":1720,"wires":[["42666aaa.62db84"]]},{"id":"42666aaa.62db84","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"off","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1550,"y":1720,"wires":[["4693478d.891008"]]},{"id":"d193ea54.c30af8","type":"hue-light","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Master Bedroom Light 4","bridge":"74cddefe.a3a54","lightid":"27","colornamer":true,"skipevents":false,"x":1950,"y":1828,"wires":[[]]},{"id":"445bb241.48ce0c","type":"hue-light","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Master Bedroom Light 1","bridge":"74cddefe.a3a54","lightid":"29","colornamer":true,"skipevents":false,"x":1950,"y":1680,"wires":[[]]},{"id":"bf826a9f.824848","type":"hue-light","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Master Bedroom Light 3","bridge":"74cddefe.a3a54","lightid":"28","colornamer":true,"skipevents":false,"x":1950,"y":1727,"wires":[[]]},{"id":"9cd6baba.fe8428","type":"hue-light","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Master Bedroom Light 2","bridge":"74cddefe.a3a54","lightid":"30","colornamer":true,"skipevents":false,"x":1950,"y":1780,"wires":[[]]},{"id":"c9eb1442.2b4f68","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"off","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1550,"y":1680,"wires":[["51642b1e.c039f4"]]},{"id":"c2641fc.322cbe","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Rein in bed","server":"a626e778.3c46e8","deviceId":"7","attribute":"switch","sendEvent":false,"x":1410,"y":1680,"wires":[["c9eb1442.2b4f68"]]},{"id":"cf591ecd.012a2","type":"switch","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"off","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1550,"y":1780,"wires":[["4bdc3801.ad46b8"]]},{"id":"3ee00e59.6b4a62","type":"hubitat device","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"Angus in bed","server":"a626e778.3c46e8","deviceId":"6","attribute":"switch","sendEvent":false,"x":1410,"y":1780,"wires":[["cf591ecd.012a2"]]},{"id":"600a3a5c.2bb5d4","type":"inject","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"","props":[{"p":"payload.currentValue","v":"active","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":260,"y":1800,"wires":[["85cff0c1.55c1e"]]},{"id":"c7d9bc76.4bb86","type":"debug","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":1760,"wires":[]},{"id":"61ba0c5.dbab7f4","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"set on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":1820,"wires":[["9cd6baba.fe8428","d193ea54.c30af8"]]},{"id":"4bdc3801.ad46b8","type":"change","z":"26b8e1d1.fffdfe","g":"2f685de9.9ff732","name":"set level & on","rules":[{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.brightness","pt":"msg","to":"circadianLevel","tot":"global"},{"t":"set","p":"payload.colorTemp","pt":"msg","to":"circadianTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":1780,"wires":[["9cd6baba.fe8428","d193ea54.c30af8"]]},{"id":"7927c2ae.368abc","type":"inject","z":"26b8e1d1.fffdfe","g":"8f6a0022.0dc0c","name":"off","props":[{"p":"payload.on","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":1500,"y":340,"wires":[["797958ae.2f36c8"]]},{"id":"74cddefe.a3a54","type":"hue-bridge","z":"","name":"Ban Amphur Home","bridge":"192.168.0.147","key":"DtEvS2kGBQEoqFOuhWANUh0R2ZpEVmd-Qocp14mi","interval":"1000","disableupdates":false},{"id":"a626e778.3c46e8","type":"hubitat config","z":"","name":"myHubitat","usetls":false,"host":"192.168.0.167","port":"80","appId":"2628","nodeRedServer":"http://192.168.0.185:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":true}]
FInally, I've found this set-up (image below) helpful to synchronise my lighting switches (this way I can adjust them either in ND or in HE). Not perfectly happy with this yet, I'm sure there must be a better way but anyway it works for me and might be useful as an idea for others.
All of this together has completely transformed the motion lighting at my property from sluggish at best on HE to instant on NR. Instead of going via HE I'm actioning the lighting directly now from NR to Hue and it is instantaneous. I then have the groups in Hue connected to HE so that dashboards there get updated fairly quickly with the polling mechanism and I can still adjust the lighting from an HE dashboard if I want (or indeed from the Hue app). So this is a really flexible set-up.
I use websocket and it's been working very fine (although I do see some errors in NR as posted elsewhere, but the flows continue to work).