Hey @stu1811, I actually can’t replicate the issue you’re receiving. Can you try importing this subflow to see if that fixes it on your end?
[{"id":"622f6fdc.53255","type":"subflow","name":"Inovelli Switch Colors","info":"","category":"","in":[{"x":180,"y":460,"wires":[{"id":"afd4ba78.36e738"}]}],"out":[{"x":1340,"y":460,"wires":[{"id":"24eba44b.be043c","port":0},{"id":"29484e6d.985c22","port":0},{"id":"67d291ec.e9f9c","port":0},{"id":"fa5d6adf.e2b278","port":0},{"id":"cc8df5bc.47d9c8","port":0},{"id":"3a671d8f.61fd52","port":0},{"id":"699fd353.e1e86c","port":0},{"id":"895f93f4.e4446","port":0},{"id":"5a546c17.129624","port":0},{"id":"9acc62e5.b9c1c","port":0},{"id":"cbae533c.14307","port":0},{"id":"96770017.8ff7c","port":0},{"id":"c6da46f4.03d3e8","port":0},{"id":"84349430.689418","port":0},{"id":"c39b55c0.257998","port":0},{"id":"3fc738af.17aa18","port":0},{"id":"d9e24a81.db4418","port":0},{"id":"9f680e18.5d04f","port":0},{"id":"136d361a.4ba82a","port":0},{"id":"43c62b5e.14f134","port":0}]}],"env":[{"name":"color","type":"str","value":""}],"color":"#DDBBCC"},{"id":"366c6b5d.5d62f4","type":"switch","z":"622f6fdc.53255","name":"Notification Color","property":"color","propertyType":"msg","rules":[{"t":"eq","v":"red","vt":"str"},{"t":"eq","v":"orange","vt":"str"},{"t":"eq","v":"gold","vt":"str"},{"t":"eq","v":"yellow","vt":"str"},{"t":"eq","v":"yellow_green","vt":"str"},{"t":"eq","v":"green","vt":"str"},{"t":"eq","v":"irish","vt":"str"},{"t":"eq","v":"spring_green","vt":"str"},{"t":"eq","v":"cyan","vt":"str"},{"t":"eq","v":"teal","vt":"str"},{"t":"eq","v":"azure","vt":"str"},{"t":"eq","v":"blue","vt":"str"},{"t":"eq","v":"light_purple","vt":"str"},{"t":"eq","v":"purple","vt":"str"},{"t":"eq","v":"violet","vt":"str"},{"t":"eq","v":"light_pink","vt":"str"},{"t":"eq","v":"pink","vt":"str"},{"t":"eq","v":"white","vt":"str"},{"t":"eq","v":"random","vt":"str"},{"t":"eq","v":"true_random","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":21,"x":770,"y":460,"wires":[["24eba44b.be043c"],["29484e6d.985c22"],["9f680e18.5d04f"],["67d291ec.e9f9c"],["fa5d6adf.e2b278"],["cc8df5bc.47d9c8"],["136d361a.4ba82a"],["3a671d8f.61fd52"],["699fd353.e1e86c"],["895f93f4.e4446"],["d9e24a81.db4418"],["5a546c17.129624"],["3fc738af.17aa18"],["9acc62e5.b9c1c"],["43c62b5e.14f134"],["cbae533c.14307"],["96770017.8ff7c"],["c6da46f4.03d3e8"],["84349430.689418"],["c39b55c0.257998"],["14bbea53.6556f6"]]},{"id":"24eba44b.be043c","type":"change","z":"622f6fdc.53255","name":"Set Red","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":120,"wires":[[]]},{"id":"cc8df5bc.47d9c8","type":"change","z":"622f6fdc.53255","name":"Set Green","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"85","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":320,"wires":[[]]},{"id":"9acc62e5.b9c1c","type":"change","z":"622f6fdc.53255","name":"Set Purple","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"177","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":640,"wires":[[]]},{"id":"cbae533c.14307","type":"change","z":"622f6fdc.53255","name":"Set Light_Pink","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"220","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":680,"wires":[[]]},{"id":"5a546c17.129624","type":"change","z":"622f6fdc.53255","name":"Set Blue","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"170","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":560,"wires":[[]]},{"id":"67d291ec.e9f9c","type":"change","z":"622f6fdc.53255","name":"Set Yellow","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"42","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":240,"wires":[[]]},{"id":"14bbea53.6556f6","type":"function","z":"622f6fdc.53255","name":"Throw Color Error","func":"throw(\"Invalid Color Selected. Please choose either red, orange, yellow, yellow_green, green, cyan, teal, blue, purple, light_pink, pink, white, random or true_random. You provided: \" + msg.color)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1070,"y":920,"wires":[]},{"id":"895f93f4.e4446","type":"change","z":"622f6fdc.53255","name":"Set Teal","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"145","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":480,"wires":[[]]},{"id":"96770017.8ff7c","type":"change","z":"622f6fdc.53255","name":"Set Pink","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"234","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":760,"wires":[[]]},{"id":"29484e6d.985c22","type":"change","z":"622f6fdc.53255","name":"Set Orange","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"11","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":160,"wires":[[]]},{"id":"c6da46f4.03d3e8","type":"change","z":"622f6fdc.53255","name":"Set White","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"255","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":800,"wires":[[]]},{"id":"afd4ba78.36e738","type":"change","z":"622f6fdc.53255","name":"Set msg.color","rules":[{"t":"set","p":"color","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color","pt":"msg","to":"color_name","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":460,"wires":[["51e16179.42c08"]]},{"id":"3a671d8f.61fd52","type":"change","z":"622f6fdc.53255","name":"Set Spring_Green","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"110","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":400,"wires":[[]]},{"id":"fa5d6adf.e2b278","type":"change","z":"622f6fdc.53255","name":"Set Yellow_Green","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"65","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":280,"wires":[[]]},{"id":"699fd353.e1e86c","type":"change","z":"622f6fdc.53255","name":"Set Cyan","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"127","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":440,"wires":[[]]},{"id":"84349430.689418","type":"function","z":"622f6fdc.53255","name":"Set Random Color","func":"var color = ['0', '11', '28', '42', '65', '85', '95', '110', '127', '145', '164', '170', '177', '195', '212', '220', '234', '255']; \nvar rand = color[(Math.random() * color.length) | 0]\n\nmsg.color_number = {};\nmsg.color_number = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1070,"y":840,"wires":[[]]},{"id":"51e16179.42c08","type":"function","z":"622f6fdc.53255","name":"Correct value for color","func":"msg.color = msg.color.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":460,"wires":[["366c6b5d.5d62f4"]]},{"id":"7b266d5e.6cbf74","type":"comment","z":"622f6fdc.53255","name":"Inovelli Switch Colors","info":"","x":440,"y":220,"wires":[]},{"id":"c39b55c0.257998","type":"function","z":"622f6fdc.53255","name":"Set True_Random Color","func":"var rand = Math.floor(Math.random() * 255) + 1;\n\nmsg.color_number = {};\nmsg.color_number = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1090,"y":880,"wires":[[]]},{"id":"3fc738af.17aa18","type":"change","z":"622f6fdc.53255","name":"Set Light_Purple","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"195","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":600,"wires":[[]]},{"id":"9f680e18.5d04f","type":"change","z":"622f6fdc.53255","name":"Set Gold","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"28","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":200,"wires":[[]]},{"id":"d9e24a81.db4418","type":"change","z":"622f6fdc.53255","name":"Set Azure","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"164","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":520,"wires":[[]]},{"id":"136d361a.4ba82a","type":"change","z":"622f6fdc.53255","name":"Set Irish","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"95","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":360,"wires":[[]]},{"id":"43c62b5e.14f134","type":"change","z":"622f6fdc.53255","name":"Set Violet","rules":[{"t":"set","p":"color_number","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color_number","pt":"msg","to":"212","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":720,"wires":[[]]},{"id":"ced394cd.07a138","type":"subflow","name":"Inovelli Switch Effect Calculator ZwaveJS","info":"Use this Subflow to calculate a notification for either a single entity id or a group of entities within a group titled **group.inovelli_switches**.\n\nAdditionally, this subflow can be used to define a permanent color in place of the solid blue color (170).\n\nLastly, this can also set the on and off brightness of the switch.\n\nFull directions provided in the below link: https://docs.google.com/document/d/1QPAO0wZgsBvZ5d8yD3xoDUpZX2YorPeEuY-Loz3mcRI/edit?usp=sharing","category":"","in":[{"x":280,"y":400,"wires":[{"id":"387f188b.b8e878"}]}],"out":[{"x":3480,"y":2660,"wires":[{"id":"280109e1.7dd616","port":0},{"id":"dccff49c.686cf8","port":0},{"id":"7b15da79.7a5874","port":0},{"id":"d56c5d09.c3c6e","port":0},{"id":"c688ddb9.ac587","port":0},{"id":"cbff6a4d.ab1e98","port":0}]}],"env":[{"name":"single_or_group","type":"str","value":"single"},{"name":"device_id","type":"str","value":"light.under_deck_light_level"},{"name":"is_permanent","type":"str","value":"no"},{"name":"switch_type","type":"str","value":"dimmer"},{"name":"color_name","type":"str","value":"red"},{"name":"brightness","type":"str","value":"10"},{"name":"total_time","type":"str","value":"5"},{"name":"measure_time","type":"str","value":"seconds"},{"name":"effect","type":"str","value":"breath"},{"name":"off_brightness","type":"str","value":""},{"name":"on_brightness","type":"str","value":""}],"color":"#789123","status":{"x":300,"y":220,"wires":[{"id":"5b1abf00.e5c32","port":0}]}},{"id":"5b1abf00.e5c32","type":"status","z":"ced394cd.07a138","name":"","scope":null,"x":180,"y":220,"wires":[[]]},{"id":"6b7bedfd.f99d94","type":"switch","z":"ced394cd.07a138","name":"Make sure there's a color","property":"color_name","propertyType":"env","rules":[{"t":"empty"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":2,"x":270,"y":1080,"wires":[["343233db.d0313c"],["762c608d.24285"]]},{"id":"762c608d.24285","type":"subflow:622f6fdc.53255","z":"ced394cd.07a138","name":"","env":[],"x":520,"y":1100,"wires":[["e9b0ba4a.df14b8"]]},{"id":"4cd2d8a3.bde3e8","type":"switch","z":"ced394cd.07a138","name":"What is the brightness value","property":"brightness","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"10","v2t":"num"},{"t":"eq","v":"random","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1740,"y":720,"wires":[["f0565f95.619f4"],["70383bf1.4b7384"],["3c82e100.cfedae"]]},{"id":"f0565f95.619f4","type":"function","z":"ced394cd.07a138","name":"Extract Brightness Value","func":"var light = parseInt(msg.brightness);\n\nmsg.bright = {};\nmsg.bright = parseInt(light);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2010,"y":680,"wires":[["6b7bedfd.f99d94"]]},{"id":"3c82e100.cfedae","type":"function","z":"ced394cd.07a138","name":"Throw brightness error","func":"throw(\"Invalid Brightness Selected. Brightness cannot be blank and must be between 1 and 10. You selected: \" + msg.brightness)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":2000,"y":760,"wires":[]},{"id":"e9b0ba4a.df14b8","type":"change","z":"ced394cd.07a138","name":"Set msg.color","rules":[{"t":"set","p":"color","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color","pt":"msg","to":"color_number","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":1100,"wires":[["4ed0e38e.d53aac"]]},{"id":"ca30863e.3b3f18","type":"change","z":"ced394cd.07a138","name":"Set msg.brightness","rules":[{"t":"set","p":"brightness","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"brightness","pt":"msg","to":"brightness","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":720,"wires":[["adbba3a4.23c03"]]},{"id":"ff1489b9.2a33e8","type":"switch","z":"ced394cd.07a138","name":"What is the measure of time?","property":"measure_time","propertyType":"msg","rules":[{"t":"eq","v":"seconds","vt":"str"},{"t":"eq","v":"minutes","vt":"str"},{"t":"eq","v":"hours","vt":"str"},{"t":"eq","v":"forever","vt":"str"},{"t":"eq","v":"random","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":6,"x":2100,"y":1440,"wires":[["8d94f9c3.13a1e8"],["9ae8430.cbb0bc"],["1765a727.a7cbf9"],["c63d35b2.25f678"],["98f8c9ca.731868"],["5d04df19.5b454"]]},{"id":"93d0dd4e.55bfe","type":"change","z":"ced394cd.07a138","name":"set msg.total_time","rules":[{"t":"set","p":"total_time","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"total_time","pt":"msg","to":"total_time","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":1440,"wires":[["c28d364a.c4d0c8"]]},{"id":"8d94f9c3.13a1e8","type":"function","z":"ced394cd.07a138","name":"Calculate for Seconds","func":"var amount = parseInt(msg.total_time);\n\nmsg.time = {};\nmsg.time = parseInt(amount);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2380,"y":1320,"wires":[["c66288ba.effca8"]]},{"id":"9ae8430.cbb0bc","type":"function","z":"ced394cd.07a138","name":"Calculate for Minutes","func":"var amount = parseInt(msg.total_time);\n\nmsg.time = {};\n\nif (amount === 1)\n{\n msg.time = parseInt(amount * 60);\n}\n\nelse\n{\n msg.time = parseInt(amount + 60);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2380,"y":1360,"wires":[["c66288ba.effca8"]]},{"id":"1765a727.a7cbf9","type":"function","z":"ced394cd.07a138","name":"Calculate for Hours","func":"var amount = parseInt(msg.total_time);\n\nmsg.time = {};\n\nif (amount === 1)\n{\n msg.time = parseInt(amount * 120);\n}\n\nelse\n{\n msg.time = parseInt(amount + 120);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2370,"y":1400,"wires":[["c66288ba.effca8"]]},{"id":"c63d35b2.25f678","type":"function","z":"ced394cd.07a138","name":"Calculate for Forever","func":"msg.time = {};\nmsg.time = parseInt(255);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2380,"y":1440,"wires":[["c66288ba.effca8"]]},{"id":"5d04df19.5b454","type":"function","z":"ced394cd.07a138","name":"Throw time error","func":"throw(\"Invalid Measure of Time Selected. Valid entries inlude seconds, minutes, hours, or forever. You supplied: \" + msg.measure_time)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":2360,"y":1520,"wires":[]},{"id":"c66288ba.effca8","type":"switch","z":"ced394cd.07a138","name":"What switch type was defined?","property":"switch","propertyType":"msg","rules":[{"t":"eq","v":"switch","vt":"str"},{"t":"eq","v":"dimmer","vt":"str"},{"t":"eq","v":"combo_light","vt":"str"},{"t":"eq","v":"combo_fan","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":230,"y":2160,"wires":[["78f7d2f.52d912c"],["56c0899b.f666e8"],["fc9836f9.fe0f28"],["a1bb956f.4b7528"],["48812b47.28b2c4"]]},{"id":"56c0899b.f666e8","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 16 (dimmer)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"16","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2120,"wires":[["ff608c9a.bbf18"]]},{"id":"78f7d2f.52d912c","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 8 (switch)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":2080,"wires":[["ff608c9a.bbf18"]]},{"id":"48812b47.28b2c4","type":"function","z":"ced394cd.07a138","name":"Throw switch error","func":"throw(\"Invalid Switch Defined. Switch must either be a dimmer, switch, combo_light, or combo_fan. You supplied: \" + msg.switch)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":510,"y":2240,"wires":[]},{"id":"ff608c9a.bbf18","type":"change","z":"ced394cd.07a138","name":"Set msg.effect","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"effect","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":2120,"wires":[["14c351bc.5747ae"]]},{"id":"7040998f.d28a98","type":"switch","z":"ced394cd.07a138","name":"Which effect was defined?","property":"effect","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"solid","vt":"str"},{"t":"eq","v":"chase","vt":"str"},{"t":"eq","v":"fast_blink","vt":"str"},{"t":"eq","v":"slow_blink","vt":"str"},{"t":"eq","v":"blink","vt":"str"},{"t":"eq","v":"pulse","vt":"str"},{"t":"eq","v":"breath","vt":"str"},{"t":"eq","v":"random","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":10,"x":1710,"y":1960,"wires":[["fc5a2e0b.2d172"],["5a3101a2.1857e"],["ee3c7827.057288"],["658a2d88.5d1814"],["8e39fc30.452ca"],["8e39fc30.452ca"],["737c2d32.2b9694"],["737c2d32.2b9694"],["e5ff5c32.53818"],["36266957.96bf46"]]},{"id":"5a3101a2.1857e","type":"change","z":"ced394cd.07a138","name":"Set effect to 1","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":1860,"wires":[["4a754925.93f358"]]},{"id":"fc5a2e0b.2d172","type":"change","z":"ced394cd.07a138","name":"Set effect to 0","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":1820,"wires":[["4a754925.93f358"]]},{"id":"658a2d88.5d1814","type":"change","z":"ced394cd.07a138","name":"Set effect to 3","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":1940,"wires":[["4a754925.93f358"]]},{"id":"8e39fc30.452ca","type":"change","z":"ced394cd.07a138","name":"Set effect to 4","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":1980,"wires":[["4a754925.93f358"]]},{"id":"737c2d32.2b9694","type":"change","z":"ced394cd.07a138","name":"Set effect to 5","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"5","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2020,"wires":[["4a754925.93f358"]]},{"id":"ee3c7827.057288","type":"change","z":"ced394cd.07a138","name":"Set effect to 2","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":1900,"wires":[["4a754925.93f358"]]},{"id":"36266957.96bf46","type":"function","z":"ced394cd.07a138","name":"Throw effect error","func":"throw(\"Invalid Effect Listed. Valid choices for effects include off, solid, chase, fast_blink, slow_blink, blink, pulse, or breath. You selected: \" + msg.effect)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":2170,"y":2100,"wires":[]},{"id":"4a754925.93f358","type":"function","z":"ced394cd.07a138","name":"Calculate Parameter Effect","func":"var colorchoice = parseInt(msg.color);\nvar timeamount = parseInt(msg.time);\nvar bright = parseInt(msg.bright);\nvar effectchoice = parseInt(msg.effect);\n\nmsg.calculation = {};\nmsg.calculation = parseInt((colorchoice) + (bright * 256) + (timeamount * 65536) + (effectchoice * 16777216))\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2580,"y":2140,"wires":[["190b03a.0f6b4fc"]]},{"id":"adbba3a4.23c03","type":"function","z":"ced394cd.07a138","name":"Correct value for brightness if needed","func":"msg.brightness = msg.brightness.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1430,"y":720,"wires":[["4cd2d8a3.bde3e8"]]},{"id":"c28d364a.c4d0c8","type":"function","z":"ced394cd.07a138","name":"Correct value for total_time if needed","func":"msg.total_time = msg.total_time.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":1440,"wires":[["beedc17a.35662"]]},{"id":"bf806ca.915109","type":"function","z":"ced394cd.07a138","name":"Correct value for measure_time if needed","func":"msg.measure_time = msg.measure_time.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1180,"y":1440,"wires":[["a605b835.d530b8"]]},{"id":"14c351bc.5747ae","type":"function","z":"ced394cd.07a138","name":"Correct value for effect if needed","func":"msg.effect = msg.effect.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":2120,"wires":[["2d152983.12d8b6"]]},{"id":"70383bf1.4b7384","type":"function","z":"ced394cd.07a138","name":"Set random brightness","func":"var rand = Math.floor(Math.random() * 10) + 1;\n\nmsg.bright = {};\nmsg.bright = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":2000,"y":720,"wires":[["6b7bedfd.f99d94"]]},{"id":"cc804692.070ae8","type":"comment","z":"ced394cd.07a138","name":"Define if Single Device or Group","info":"","x":950,"y":320,"wires":[]},{"id":"a605b835.d530b8","type":"switch","z":"ced394cd.07a138","name":"Check if time is valid","property":"total_time","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"255","v2t":"num"},{"t":"eq","v":"random","vt":"str"},{"t":"eq","v":"forever","vt":"str"},{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":1480,"y":1440,"wires":[["ff1489b9.2a33e8"],["641b2be0.2e6764"],["ff1489b9.2a33e8"],["9237fb11.fe9548"],["a412519d.8b225"]]},{"id":"a412519d.8b225","type":"function","z":"ced394cd.07a138","name":"Throw time error","func":"throw(\"Invalid Time Defined. Time must be between 1 and 255, or blank if measure of time is forever. You supplied: \" + msg.total_time)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1720,"y":1560,"wires":[]},{"id":"beedc17a.35662","type":"change","z":"ced394cd.07a138","name":"Set msg.measure_time","rules":[{"t":"set","p":"measure_time","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"measure_time","pt":"msg","to":"measure_time","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":1440,"wires":[["bf806ca.915109"]]},{"id":"9237fb11.fe9548","type":"switch","z":"ced394cd.07a138","name":"Is measure_time forever?","property":"measure_time","propertyType":"msg","rules":[{"t":"eq","v":"forever","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1770,"y":1500,"wires":[["ff1489b9.2a33e8"],["19e5d46b.660abc"]]},{"id":"19e5d46b.660abc","type":"function","z":"ced394cd.07a138","name":"Throw time error","func":"throw(\"Time can only be blank if measure_time is set to forever. Please define a value for total_time or change measure_time to forever and try again.\")\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1980,"y":1560,"wires":[]},{"id":"641b2be0.2e6764","type":"function","z":"ced394cd.07a138","name":"Set random time","func":"var rand = Math.floor(Math.random() * 255) + 1;\n\nmsg.total_time = {};\nmsg.total_time = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1720,"y":1380,"wires":[["ff1489b9.2a33e8"]]},{"id":"98f8c9ca.731868","type":"function","z":"ced394cd.07a138","name":"Calculate for Random","func":"var rand = parseInt(msg.total_time)\n\nmsg.time = {};\nmsg.time = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2380,"y":1480,"wires":[["c66288ba.effca8"]]},{"id":"e5ff5c32.53818","type":"function","z":"ced394cd.07a138","name":"Set random effect","func":"var rand = Math.floor(Math.random() * 5) + 1;\n\nmsg.effect = {};\nmsg.effect = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":2170,"y":2060,"wires":[["4a754925.93f358"]]},{"id":"387f188b.b8e878","type":"change","z":"ced394cd.07a138","name":"Set msg.singleorgroup","rules":[{"t":"set","p":"singleorgroup","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"singleorgroup","pt":"msg","to":"single_or_group","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":400,"wires":[["48c115b1.a1cdcc"]]},{"id":"3cfa6e8f.ecce52","type":"switch","z":"ced394cd.07a138","name":"Is this a single node or group?","property":"singleorgroup","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"group","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1090,"y":400,"wires":[["4b16dd5f.e88624"],["d763fdc8.f1ebf"],["ac4e743d.fcec78"]]},{"id":"ac4e743d.fcec78","type":"function","z":"ced394cd.07a138","name":"Throw node error","func":"throw(\"Invalid selection for single or group. Valid entries include either single, or group. You provided: \" + msg.singleorgroup)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1370,"y":480,"wires":[]},{"id":"48c115b1.a1cdcc","type":"function","z":"ced394cd.07a138","name":"Correct value for singleorgroup if needed","func":"msg.singleorgroup = msg.singleorgroup.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":740,"y":400,"wires":[["3cfa6e8f.ecce52"]]},{"id":"4b16dd5f.e88624","type":"change","z":"ced394cd.07a138","name":"Set device ID","rules":[{"t":"set","p":"node","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"node","pt":"msg","to":"device_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":1350,"y":320,"wires":[["b55ed425.618328"]]},{"id":"78119ef8.149e2","type":"change","z":"ced394cd.07a138","name":"Set Entity_ID","rules":[{"t":"set","p":"node","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"node","pt":"msg","to":"payload.entity_id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1930,"y":400,"wires":[["3993c503.2a334a","ce2b44ff.566188"]]},{"id":"d763fdc8.f1ebf","type":"ha-get-entities","z":"ced394cd.07a138","name":"Get all Inovelli switches","server":"497693ef.d5e6bc","version":0,"rules":[{"property":"entity_id","logic":"in_group","value":"group.inovelli_switches","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":1390,"y":400,"wires":[["548017f8.8fc668"]]},{"id":"548017f8.8fc668","type":"split","z":"ced394cd.07a138","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1590,"y":400,"wires":[["36b39b6b.69adc4"]]},{"id":"36b39b6b.69adc4","type":"delay","z":"ced394cd.07a138","name":"","pauseType":"rate","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"0.01","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1750,"y":400,"wires":[["78119ef8.149e2"]]},{"id":"cc4fff5d.2c35a","type":"function","z":"ced394cd.07a138","name":"Throw permanence error","func":"throw(\"Invalid selection for is_permanent. Valid entries are yes (permanent change) or no (this is a notification). You provided: \" + msg.ispermanent)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1170,"y":780,"wires":[]},{"id":"e83f8a25.9ee728","type":"switch","z":"ced394cd.07a138","name":"Is this change permanent?","property":"ispermanent","propertyType":"msg","rules":[{"t":"eq","v":"no","vt":"str"},{"t":"eq","v":"yes","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":900,"y":740,"wires":[["ca30863e.3b3f18"],["6b7bedfd.f99d94"],["cc4fff5d.2c35a"]]},{"id":"dccff49c.686cf8","type":"join","z":"ced394cd.07a138","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":3170,"y":2220,"wires":[[]]},{"id":"280109e1.7dd616","type":"switch","z":"ced394cd.07a138","name":"Single node or group?","property":"singleorgroup","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"group","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":3140,"y":2140,"wires":[[],["dccff49c.686cf8"]]},{"id":"208ad7a9.681698","type":"switch","z":"ced394cd.07a138","name":"What switch type was defined?","property":"switch","propertyType":"msg","rules":[{"t":"eq","v":"dimmer","vt":"str"},{"t":"eq","v":"switch","vt":"str"},{"t":"eq","v":"combo_light","vt":"str"},{"t":"eq","v":"combo_fan","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":2090,"y":1100,"wires":[["f7f6c719.08b8a8"],["a5241186.7274d"],["652d0e43.7d5dd"],["5397edc9.817994"],["7e3465a4.fee7dc"]]},{"id":"f7f6c719.08b8a8","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 13 (dimmer)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"13","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2410,"y":1000,"wires":[["f55f6e2a.9a6e"]]},{"id":"7e3465a4.fee7dc","type":"function","z":"ced394cd.07a138","name":"Throw switch error","func":"throw(\"Invalid Switch Defined. Switch must either be a dimmer, switch, combo_light, or combo_fan. You supplied: \" + msg.switch)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":2370,"y":1200,"wires":[]},{"id":"4ed0e38e.d53aac","type":"change","z":"ced394cd.07a138","name":"Set Switch Type","rules":[{"t":"set","p":"switch","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"switch","pt":"msg","to":"switch_type","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":1100,"wires":[["aec81b3c.aa42c8"]]},{"id":"aec81b3c.aa42c8","type":"function","z":"ced394cd.07a138","name":"Correct value for switch if needed","func":"msg.switch = msg.switch.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1200,"y":1100,"wires":[["4bfc94ec.ec9a5c"]]},{"id":"f55f6e2a.9a6e","type":"change","z":"ced394cd.07a138","name":"Set msg.calculation","rules":[{"t":"set","p":"calculation","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"calculation","pt":"msg","to":"color","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2650,"y":1080,"wires":[["190b03a.0f6b4fc"]]},{"id":"28fb6ee7.af7092","type":"change","z":"ced394cd.07a138","name":"Set msg.offbright","rules":[{"t":"set","p":"offbright","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"offbright","pt":"msg","to":"off_brightness","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":2840,"wires":[["eed01666.fa20c8"]]},{"id":"eed01666.fa20c8","type":"function","z":"ced394cd.07a138","name":"Correct value for offbright if needed","func":"msg.offbright = msg.offbright.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":2840,"wires":[["c0ea2e78.2a6c8"]]},{"id":"8c493c95.38053","type":"change","z":"ced394cd.07a138","name":"Set msg.onbright","rules":[{"t":"set","p":"onbright","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"onbright","pt":"msg","to":"on_brightness","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":2600,"wires":[["7756c42c.28689c"]]},{"id":"7756c42c.28689c","type":"function","z":"ced394cd.07a138","name":"Correct value for onbright if needed","func":"msg.onbright = msg.onbright.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":2600,"wires":[["bd5bac16.10df9"]]},{"id":"c0ea2e78.2a6c8","type":"switch","z":"ced394cd.07a138","name":"Is off_brightness between 1 and 10?","property":"offbright","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"10","v2t":"num"},{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1590,"y":2840,"wires":[["35b081c6.950bee"],[],["13288cce.42ac03"]]},{"id":"bd5bac16.10df9","type":"switch","z":"ced394cd.07a138","name":"Is on_brightness between 1 and 10?","property":"onbright","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"10","v2t":"num"},{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1590,"y":2600,"wires":[["824dbf13.5af8e"],[],["68f11a70.274fb4"]]},{"id":"cbff6a4d.ab1e98","type":"join","z":"ced394cd.07a138","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":3190,"y":2700,"wires":[[]]},{"id":"7b15da79.7a5874","type":"switch","z":"ced394cd.07a138","name":"Single node or group?","property":"singleorgroup","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"group","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":3160,"y":2800,"wires":[[],["d56c5d09.c3c6e"]]},{"id":"c688ddb9.ac587","type":"switch","z":"ced394cd.07a138","name":"Single node or group?","property":"singleorgroup","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"group","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":3140,"y":2620,"wires":[[],["cbff6a4d.ab1e98"]]},{"id":"385c0b27.521f24","type":"function","z":"ced394cd.07a138","name":"Throw switch error","func":"throw(\"Invalid Switch Defined. Switch must either be a dimmer, switch, combo_light, or combo_fan. You supplied: \" + msg.switch)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1990,"y":2920,"wires":[]},{"id":"a2f806fd.9da5a8","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 19 (combo_light)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"19","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2360,"y":2600,"wires":[["fa33dfb6.6358c"]]},{"id":"fbab1076.c7166","type":"function","z":"ced394cd.07a138","name":"Throw switch error","func":"throw(\"Invalid Switch Defined. Switch must either be a dimmer, switch, combo_light, or combo_fan. You supplied: \" + msg.switch)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1970,"y":2680,"wires":[]},{"id":"652d0e43.7d5dd","type":"function","z":"ced394cd.07a138","name":"Set Parameter 18 to Calculation (combo_light)","func":"var hue = parseInt(msg.color);\n\nmsg.parameter = {};\nmsg.parameter = 18;\n\nmsg.calculation = {};\nmsg.calculation = parseInt(hue / 255 * 350);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2460,"y":1120,"wires":[["190b03a.0f6b4fc"]]},{"id":"3993c503.2a334a","type":"change","z":"ced394cd.07a138","name":"Set Switch Type","rules":[{"t":"set","p":"switch","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"switch","pt":"msg","to":"switch_type","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":2660,"wires":[["4c119950.cea458"]]},{"id":"4c119950.cea458","type":"function","z":"ced394cd.07a138","name":"Correct value for switch if needed","func":"msg.switch = msg.switch.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":2660,"wires":[["28fb6ee7.af7092","8c493c95.38053"]]},{"id":"13288cce.42ac03","type":"function","z":"ced394cd.07a138","name":"Throw offbright error","func":"throw(\"Invalid Off Brightness Defined. Value must be between 1 and 10, or blank. You supplied: \" + msg.offbright)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1640,"y":2900,"wires":[]},{"id":"68f11a70.274fb4","type":"function","z":"ced394cd.07a138","name":"Throw onbright error","func":"throw(\"Invalid On Brightness Defined. Value must be between 1 and 10, or blank. You supplied: \" + msg.onbright)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1640,"y":2660,"wires":[]},{"id":"d56c5d09.c3c6e","type":"join","z":"ced394cd.07a138","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":3210,"y":2880,"wires":[[]]},{"id":"d4bdbb6f.224108","type":"function","z":"ced394cd.07a138","name":"Throw device error","func":"throw(\"device_id cannot be 0 or blank if single_or_group is defined as single. Please either add in a device_id or change single_or_group to group and try again. Value provided was: \" + msg.node)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1950,"y":320,"wires":[]},{"id":"61de5933.0f9dd8","type":"comment","z":"ced394cd.07a138","name":"On/Off Brightness Set","info":"","x":1540,"y":2500,"wires":[]},{"id":"a597a01b.bdfe3","type":"comment","z":"ced394cd.07a138","name":"Set Permanent Color","info":"","x":2340,"y":880,"wires":[]},{"id":"190b03a.0f6b4fc","type":"api-call-service","z":"ced394cd.07a138","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"bulk_set_partial_config_parameters","entityId":"","data":"{ \t \"entity_id\": msg.node,\t \"parameter\": msg.parameter, \t \"value\": msg.calculation\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2870,"y":2140,"wires":[["280109e1.7dd616"]]},{"id":"2d152983.12d8b6","type":"switch","z":"ced394cd.07a138","name":"What switch type was defined?","property":"switch","propertyType":"msg","rules":[{"t":"eq","v":"dimmer","vt":"str"},{"t":"eq","v":"combo_light","vt":"str"},{"t":"eq","v":"combo_fan","vt":"str"},{"t":"eq","v":"switch","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1430,"y":2120,"wires":[["7040998f.d28a98"],["7040998f.d28a98"],["7040998f.d28a98"],["fa221846.cfe7c8"]]},{"id":"a3ffebf5.ed6b58","type":"function","z":"ced394cd.07a138","name":"Throw chase effect error","func":"throw(\"Switches cannot use the Chase effect. Please define another effect and try again.\")\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":2190,"y":2400,"wires":[]},{"id":"fa221846.cfe7c8","type":"switch","z":"ced394cd.07a138","name":"Which effect was defined?","property":"effect","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"solid","vt":"str"},{"t":"eq","v":"fast_blink","vt":"str"},{"t":"eq","v":"slow_blink","vt":"str"},{"t":"eq","v":"blink","vt":"str"},{"t":"eq","v":"pulse","vt":"str"},{"t":"eq","v":"breath","vt":"str"},{"t":"eq","v":"random","vt":"str"},{"t":"eq","v":"chase","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":10,"x":1710,"y":2280,"wires":[["82695a04.b00148"],["7a523732.1cf438"],["36311aa4.228166"],["fe852e0d.7df8d"],["fe852e0d.7df8d"],["8d12b5e4.70ec88"],["8d12b5e4.70ec88"],["69273ae6.26f3f4"],["a3ffebf5.ed6b58"],[]]},{"id":"7a523732.1cf438","type":"change","z":"ced394cd.07a138","name":"Set effect to 1","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2200,"wires":[["4a754925.93f358"]]},{"id":"82695a04.b00148","type":"change","z":"ced394cd.07a138","name":"Set effect to 0","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2160,"wires":[["4a754925.93f358"]]},{"id":"fe852e0d.7df8d","type":"change","z":"ced394cd.07a138","name":"Set effect to 3","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2280,"wires":[["4a754925.93f358"]]},{"id":"8d12b5e4.70ec88","type":"change","z":"ced394cd.07a138","name":"Set effect to 4","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2320,"wires":[["4a754925.93f358"]]},{"id":"69273ae6.26f3f4","type":"function","z":"ced394cd.07a138","name":"Set random effect","func":"var rand = Math.floor(Math.random() * 5) + 1;\n\nmsg.effect = {};\nmsg.effect = parseInt(rand);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":2170,"y":2360,"wires":[["4a754925.93f358"]]},{"id":"bd14b20a.9cd69","type":"comment","z":"ced394cd.07a138","name":"Define Effect On/Off Switch","info":"","x":1710,"y":2140,"wires":[]},{"id":"56a85fe6.70732","type":"comment","z":"ced394cd.07a138","name":"Define Effect All Other Switches","info":"","x":1710,"y":1820,"wires":[]},{"id":"36311aa4.228166","type":"change","z":"ced394cd.07a138","name":"Set effect to 2","rules":[{"t":"set","p":"effect","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"effect","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2160,"y":2240,"wires":[["4a754925.93f358"]]},{"id":"fb0be354.bad6c","type":"comment","z":"ced394cd.07a138","name":"Define Time","info":"","x":1270,"y":1300,"wires":[]},{"id":"870f1804.cbbb58","type":"comment","z":"ced394cd.07a138","name":"Define Brightness","info":"","x":1490,"y":640,"wires":[]},{"id":"7c075f15.51bfc","type":"comment","z":"ced394cd.07a138","name":"Define Color","info":"","x":1390,"y":1000,"wires":[]},{"id":"cd542bce.675398","type":"comment","z":"ced394cd.07a138","name":"Define Notification Parameter","info":"","x":580,"y":1900,"wires":[]},{"id":"abe01825.67c988","type":"api-call-service","z":"ced394cd.07a138","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"bulk_set_partial_config_parameters","entityId":"","data":"{ \t \"entity_id\": msg.node,\t \"parameter\": msg.parameter, \t \"value\": msg.offbright\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2890,"y":2820,"wires":[["7b15da79.7a5874"]]},{"id":"fa33dfb6.6358c","type":"api-call-service","z":"ced394cd.07a138","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"bulk_set_partial_config_parameters","entityId":"","data":"{ \t \"entity_id\": msg.node,\t \"parameter\": msg.parameter, \t \"value\": msg.onbright\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2870,"y":2600,"wires":[["c688ddb9.ac587"]]},{"id":"fda28d12.be4d3","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 22 (combo_light)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"22","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2360,"y":2840,"wires":[["abe01825.67c988"]]},{"id":"5816bfbc.f4a31","type":"comment","z":"ced394cd.07a138","name":"Main Calculation","info":"","x":2560,"y":2040,"wires":[]},{"id":"b55ed425.618328","type":"switch","z":"ced394cd.07a138","name":"Make sure there's a device defined","property":"node","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1600,"y":320,"wires":[["3993c503.2a334a","ce2b44ff.566188"],["d4bdbb6f.224108"]]},{"id":"343233db.d0313c","type":"function","z":"ced394cd.07a138","name":"Throw color error","func":"throw(\"Invalid Color Selected. Color cannot be blank.\")\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":510,"y":1040,"wires":[]},{"id":"f9b0a5d0.3d69c8","type":"function","z":"ced394cd.07a138","name":"Correct value for ispermanent if needed","func":"msg.ispermanent = msg.ispermanent.trim().replace(/\\ /g, \"_\").toLowerCase();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":740,"wires":[["e83f8a25.9ee728"]]},{"id":"ce2b44ff.566188","type":"change","z":"ced394cd.07a138","name":"Set msg.ispermanent","rules":[{"t":"set","p":"ispermanent","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"ispermanent","pt":"msg","to":"is_permanent","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":740,"wires":[["f9b0a5d0.3d69c8"]]},{"id":"e1c997bd.a509e8","type":"comment","z":"ced394cd.07a138","name":"Check if permanent or not","info":"","x":730,"y":640,"wires":[]},{"id":"4bfc94ec.ec9a5c","type":"switch","z":"ced394cd.07a138","name":"Is this change permanent?","property":"ispermanent","propertyType":"msg","rules":[{"t":"eq","v":"yes","vt":"str"},{"t":"eq","v":"no","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1500,"y":1100,"wires":[["208ad7a9.681698"],["93d0dd4e.55bfe"],["a27f8ab5.11ef28"]]},{"id":"a27f8ab5.11ef28","type":"function","z":"ced394cd.07a138","name":"Throw permanence error","func":"throw(\"Invalid selection for is_permanent. Valid entries are yes (permanent change) or no (this is a notification). You provided: \" + msg.ispermanent)\nreturn msg;","outputs":0,"noerr":0,"initialize":"","finalize":"","x":1750,"y":1160,"wires":[]},{"id":"a5241186.7274d","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 5 (switch)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2400,"y":1040,"wires":[["f55f6e2a.9a6e"]]},{"id":"35b081c6.950bee","type":"switch","z":"ced394cd.07a138","name":"What switch type was defined?","property":"switch","propertyType":"msg","rules":[{"t":"eq","v":"dimmer","vt":"str"},{"t":"eq","v":"switch","vt":"str"},{"t":"eq","v":"combo_light","vt":"str"},{"t":"eq","v":"combo_fan","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":1950,"y":2840,"wires":[["92d23623.63edf8"],["f1d1beb0.cfe7a"],["fda28d12.be4d3"],["109b9bf9.7b6e14"],["385c0b27.521f24"]]},{"id":"824dbf13.5af8e","type":"switch","z":"ced394cd.07a138","name":"What switch type was defined?","property":"switch","propertyType":"msg","rules":[{"t":"eq","v":"dimmer","vt":"str"},{"t":"eq","v":"switch","vt":"str"},{"t":"eq","v":"combo_light","vt":"str"},{"t":"eq","v":"combo_fan","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":1930,"y":2600,"wires":[["b0108f40.b9254"],["f679017f.03cdc"],["a2f806fd.9da5a8"],["dba05209.17825"],["fbab1076.c7166"]]},{"id":"5397edc9.817994","type":"function","z":"ced394cd.07a138","name":"Set Parameter 20 to Calculation (combo_fan)","func":"var hue = parseInt(msg.color);\n\nmsg.parameter = {};\nmsg.parameter = 20;\n\nmsg.calculation = {};\nmsg.calculation = parseInt(hue / 255 * 350);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2450,"y":1160,"wires":[["190b03a.0f6b4fc"]]},{"id":"109b9bf9.7b6e14","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 23 (combo_fan)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"23","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2360,"y":2880,"wires":[["abe01825.67c988"]]},{"id":"dba05209.17825","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 21 (combo_fan)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"21","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2360,"y":2640,"wires":[["fa33dfb6.6358c"]]},{"id":"92d23623.63edf8","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 15 (dimmer)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"15","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2350,"y":2760,"wires":[["abe01825.67c988"]]},{"id":"f1d1beb0.cfe7a","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 7 (switch)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2340,"y":2800,"wires":[["abe01825.67c988"]]},{"id":"b0108f40.b9254","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 14 (dimmer)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"14","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2350,"y":2520,"wires":[["fa33dfb6.6358c"]]},{"id":"f679017f.03cdc","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 6 (switch)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2340,"y":2560,"wires":[["fa33dfb6.6358c"]]},{"id":"fc9836f9.fe0f28","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 24 (combo_light)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"24","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":2160,"wires":[["ff608c9a.bbf18"]]},{"id":"a1bb956f.4b7528","type":"change","z":"ced394cd.07a138","name":"Set Parameter to 25 (combo_fan)","rules":[{"t":"set","p":"parameter","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"parameter","pt":"msg","to":"25","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":2200,"wires":[["ff608c9a.bbf18"]]},{"id":"497693ef.d5e6bc","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"b35dc4b9a551831a","type":"subflow:ced394cd.07a138","z":"3fb9afca21427e1d","name":"Set Red","env":[{"name":"device_id","value":"light.bottom_stairs","type":"str"}],"x":760,"y":960,"wires":[["e2f32b1b7674f16f"]]},{"id":"2d46c294afd30b71","type":"inject","z":"3fb9afca21427e1d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":600,"y":960,"wires":[["b35dc4b9a551831a"]]},{"id":"e2f32b1b7674f16f","type":"debug","z":"3fb9afca21427e1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":960,"wires":[]}]