[{"id":"3cfbed30.826ac2","type":"inject","z":"f61766ce.f85398","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":172,"y":3184,"wires":[["d49399ae.0af8f8"]]},{"id":"d49399ae.0af8f8","type":"api-render-template","z":"f61766ce.f85398","name":"","server":"","template":"{\"hsColor\": [{{range(360)|random}},{{range(80,101)|random}}]}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":518,"y":3184,"wires":[["915e1aef.0eae18"]]},{"id":"c8c74a45.dd6308","type":"inject","z":"f61766ce.f85398","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":172,"y":3232,"wires":[["a790b534.03e6b8"]]},{"id":"a790b534.03e6b8","type":"function","z":"f61766ce.f85398","name":"","func":"msg.payload = {\n data: {\n \"hs_color\": [\n randomNumber(0,360),\n randomNumber(80,101)\n ]\n }\n}\nreturn msg;\n\nfunction randomNumber(min, max) { \n return Math.floor(Math.random() * (max - min) + min);\n} ","outputs":1,"noerr":0,"initialize":"","finalize":"","x":316,"y":3232,"wires":[["b8c884d3.84ed58"]]},{"id":"915e1aef.0eae18","type":"api-call-service","z":"f61766ce.f85398","name":"","server":"","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.light1","data":"{\"hs_color\": payload.hsColor}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":3184,"wires":[[]]},{"id":"b8c884d3.84ed58","type":"api-call-service","z":"f61766ce.f85398","name":"","server":"","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.light1","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":490,"y":3232,"wires":[[]]},{"id":"9b0e0940.2bd5a8","type":"inject","z":"f61766ce.f85398","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":172,"y":3280,"wires":[["7aa4a500.1258dc"]]},{"id":"7aa4a500.1258dc","type":"api-call-service","z":"f61766ce.f85398","name":"","server":"","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.light1","data":"(\t$randomNumber := function($low, $high) {( \t $floor($random() * ($high - $low) + $low)\t)};\t\t{\"hs_color\": [$randomNumber(0,360), $randomNumber(3, 400)]}\t)","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":346,"y":3280,"wires":[[]]}]