halo_nodered_flow.json
[{"id":"78d02f13a11aabd3","type":"subflow","name":"HALO THERMOSTAT","info":"","category":"","in":[{"x":20,"y":160,"wires":[{"id":"3408cce8c67f7e6d"}]}],"out":[{"x":2220,"y":260,"wires":[{"id":"7730acf6a9912dfe","port":0},{"id":"1d94457e7d2b0f8f","port":0},{"id":"7c7cb3edd99a915f","port":0}]}],"env":[{"name":"entity_id","type":"str","value":"climate."},{"name":"button_id","type":"str","value":"uuid"},{"name":"state_entity_id","type":"str","value":"climate."}],"meta":{},"color":"#DDAA99"},{"id":"ae2027f1ac40f72b","type":"switch","z":"78d02f13a11aabd3","name":"direction","property":"payload.event.counts","propertyType":"msg","rules":[{"t":"eq","v":"+1","vt":"num"},{"t":"eq","v":"-1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":100,"wires":[["9eac1ed57186e75e"],["4aab028f6b5e6de4"]]},{"id":"6c73b369af5275e3","type":"counter","z":"78d02f13a11aabd3","name":"","init":"200","step":"5","lower":"70","upper":"350","mode":"increment","outputs":"1","x":1380,"y":240,"wires":[["450e169067f3ed5d","c0c783138e90a421","8188a01220fe928f"]]},{"id":"4aab028f6b5e6de4","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"set","p":"decrement","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":120,"wires":[["6c73b369af5275e3"]]},{"id":"cde4289cb4463cb1","type":"rbe","z":"78d02f13a11aabd3","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"count","topi":"topic","x":1690,"y":180,"wires":[["c9e4aec0a751d5de"]]},{"id":"9eac1ed57186e75e","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"set","p":"increment","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":80,"wires":[["6c73b369af5275e3"]]},{"id":"f6f8382e2d8a2591","type":"switch","z":"78d02f13a11aabd3","name":"allow wheel","property":"payload.event.type","propertyType":"msg","rules":[{"t":"eq","v":"wheel","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":100,"wires":[["51434488a30212ce"]]},{"id":"74825660c6d2082c","type":"switch","z":"78d02f13a11aabd3","name":"allow temp","property":"data.new_state.attributes.temperature","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":200,"wires":[["d28667b57f44c5f9"]]},{"id":"c9e4aec0a751d5de","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"delete","p":"payload.event.type","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1880,"y":180,"wires":[["e0f355e61d37c267","7730acf6a9912dfe"]]},{"id":"465df54c4957c480","type":"function","z":"78d02f13a11aabd3","name":"set temp","func":"msg.payload = {\n data: {\n temperature: msg.count\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2260,"y":180,"wires":[["57c352d2b0a3db39"]]},{"id":"57c352d2b0a3db39","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":2440,"y":180,"wires":[["78990bc5a29e5d65"]]},{"id":"e0f355e61d37c267","type":"trigger","z":"78d02f13a11aabd3","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"1","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2060,"y":180,"wires":[["465df54c4957c480"]]},{"id":"78990bc5a29e5d65","type":"api-call-service","z":"78d02f13a11aabd3","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2670,"y":180,"wires":[[]]},{"id":"3408cce8c67f7e6d","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"set","p":"button_id","pt":"msg","to":"button_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":160,"wires":[["f6f8382e2d8a2591","e82cc58e45792a82"]]},{"id":"51434488a30212ce","type":"switch","z":"78d02f13a11aabd3","name":"id","property":"payload.event.id","propertyType":"msg","rules":[{"t":"eq","v":"button_id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":710,"y":100,"wires":[["ae2027f1ac40f72b"]]},{"id":"e82cc58e45792a82","type":"switch","z":"78d02f13a11aabd3","name":"push/poll?","property":"topic","propertyType":"msg","rules":[{"t":"neq","v":"newconfig","vt":"str"},{"t":"eq","v":"newconfig","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":220,"wires":[["133246c4a50626e3"],["d0f6aec82a922d71"]]},{"id":"d0f6aec82a922d71","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"set","p":"state_entity","pt":"msg","to":"state_entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":260,"wires":[["5dfb175302ed4ccf"]]},{"id":"5dfb175302ed4ccf","type":"api-current-state","z":"78d02f13a11aabd3","name":"","server":"133947b6.b167e8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"{{state_entity}}","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":650,"y":260,"wires":[["66daec1d4e221b93"]]},{"id":"450e169067f3ed5d","type":"range","z":"78d02f13a11aabd3","minin":"70","maxin":"350","minout":"7","maxout":"35","action":"scale","round":false,"property":"count","name":"","x":1530,"y":180,"wires":[["cde4289cb4463cb1"]]},{"id":"ac04733c7ad173b5","type":"range","z":"78d02f13a11aabd3","minin":"7","maxin":"35","minout":"70","maxout":"350","action":"scale","round":false,"property":"reset","name":"","x":1220,"y":240,"wires":[["6c73b369af5275e3"]]},{"id":"7730acf6a9912dfe","type":"template","z":"78d02f13a11aabd3","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"title\": \"Set to: {{count}}°\"\n }\n}","output":"json","x":2060,"y":220,"wires":[[]]},{"id":"c0c783138e90a421","type":"range","z":"78d02f13a11aabd3","minin":"70","maxin":"350","minout":"0","maxout":"100","action":"scale","round":true,"property":"count","name":"","x":1540,"y":240,"wires":[["b132aee56413be41"]]},{"id":"d5d88cea8796c6d7","type":"function","z":"78d02f13a11aabd3","name":"set temp","func":"msg.reset = msg.data.new_state.attributes.temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":200,"wires":[["ac04733c7ad173b5"]]},{"id":"73555b4a2570b803","type":"function","z":"78d02f13a11aabd3","name":"set temp","func":"msg.reset = msg.data.attributes.temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":260,"wires":[["ac04733c7ad173b5"]]},{"id":"66daec1d4e221b93","type":"function","z":"78d02f13a11aabd3","name":"set current temp","func":"msg.currenttemp = msg.data.attributes.current_temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":260,"wires":[["73555b4a2570b803"]]},{"id":"d28667b57f44c5f9","type":"function","z":"78d02f13a11aabd3","name":"set current temp","func":"msg.currenttemp = msg.data.new_state.attributes.current_temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":200,"wires":[["d5d88cea8796c6d7"]]},{"id":"1d94457e7d2b0f8f","type":"template","z":"78d02f13a11aabd3","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"value\": {{value}}\n }\n}","output":"json","x":2060,"y":260,"wires":[[]]},{"id":"7c7cb3edd99a915f","type":"template","z":"78d02f13a11aabd3","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"subtitle\": \"Current: {{currenttemp}}°\"\n }\n}","output":"json","x":2060,"y":300,"wires":[[]]},{"id":"8188a01220fe928f","type":"rbe","z":"78d02f13a11aabd3","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"currenttemp","topi":"topic","x":1530,"y":300,"wires":[["518abc8142b897d2"]]},{"id":"b132aee56413be41","type":"function","z":"78d02f13a11aabd3","name":"set temp","func":"msg.value = msg.count;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1700,"y":240,"wires":[["819f1ed96fde95c6"]]},{"id":"518abc8142b897d2","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"delete","p":"payload.event.type","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1880,"y":300,"wires":[["7c7cb3edd99a915f"]]},{"id":"819f1ed96fde95c6","type":"change","z":"78d02f13a11aabd3","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"delete","p":"payload.event.type","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1880,"y":240,"wires":[["1d94457e7d2b0f8f"]]},{"id":"133246c4a50626e3","type":"trigger","z":"78d02f13a11aabd3","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":440,"y":200,"wires":[["74825660c6d2082c"]]},{"id":"c61f5f14cee188f7","type":"subflow","name":"HALO SHADE","info":"","category":"","in":[{"x":60,"y":200,"wires":[{"id":"0cdb4b96deace082"}]}],"out":[{"x":2020,"y":260,"wires":[{"id":"3a29580e5dd0afa6","port":0},{"id":"8d15548de6996381","port":0},{"id":"6a3f7eff0c46b092","port":0}]}],"env":[{"name":"entity_id","type":"str","value":"cover."},{"name":"button_id","type":"str","value":"uuid"},{"name":"state_entity_id","type":"str","value":"cover."}],"meta":{},"color":"#DDAA99"},{"id":"57d30a428019dee5","type":"switch","z":"c61f5f14cee188f7","name":"direction","property":"payload.event.counts","propertyType":"msg","rules":[{"t":"lt","v":"-2","vt":"str"},{"t":"eq","v":"+1","vt":"num"},{"t":"eq","v":"-1","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":760,"y":120,"wires":[["3972a9565e810758"],["20b360cf8afde2bf"],["46be11885f4fc23d"]]},{"id":"b7b4fc80389b9c51","type":"counter","z":"c61f5f14cee188f7","name":"","init":"50","step":"10","lower":"0","upper":"100","mode":"decrement","outputs":"1","x":1200,"y":200,"wires":[["02ef1c8ef5e90d59"]]},{"id":"46be11885f4fc23d","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"decrement","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":160,"wires":[["b7b4fc80389b9c51"]]},{"id":"02ef1c8ef5e90d59","type":"rbe","z":"c61f5f14cee188f7","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"count","topi":"topic","x":1350,"y":200,"wires":[["ae867d9db5e5fe1f"]]},{"id":"04b78876bd4b2ae8","type":"change","z":"c61f5f14cee188f7","name":"change","rules":[{"t":"move","p":"data.new_state.attributes.current_position","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":260,"wires":[["b7b4fc80389b9c51"]]},{"id":"20b360cf8afde2bf","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"increment","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":120,"wires":[["b7b4fc80389b9c51"]]},{"id":"416eeb8d48e07b64","type":"switch","z":"c61f5f14cee188f7","name":"allow wheel","property":"payload.event.type","propertyType":"msg","rules":[{"t":"eq","v":"wheel","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":120,"wires":[["08aa987ebac2292a"]]},{"id":"9e5bf907a2cef70b","type":"switch","z":"c61f5f14cee188f7","name":"allow position","property":"data.new_state.attributes.current_position","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"}],"checkall":"true","repair":false,"outputs":1,"x":760,"y":260,"wires":[["04b78876bd4b2ae8"]]},{"id":"3972a9565e810758","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":80,"wires":[["af656c9ea78a9795"]]},{"id":"085702536437fc16","type":"switch","z":"c61f5f14cee188f7","name":"if closed","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"closed","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":600,"y":200,"wires":[["f064a15b56be3678"],["9e5bf907a2cef70b"]]},{"id":"ae867d9db5e5fe1f","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"delete","p":"payload.event.type","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1520,"y":200,"wires":[["7db53bfcd11ab3a6"]]},{"id":"7db53bfcd11ab3a6","type":"switch","z":"c61f5f14cee188f7","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"100","vt":"num"},{"t":"btwn","v":"99","vt":"num","v2":"1","v2t":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1690,"y":200,"wires":[["dd2c4733d09a5c42","8d15548de6996381"],["6a3f7eff0c46b092","dd2c4733d09a5c42"],["3a29580e5dd0afa6"]]},{"id":"38eaf42d0f2df585","type":"function","z":"c61f5f14cee188f7","name":"set position","func":"msg.payload = {\n data: {\n position: msg.count\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2070,"y":100,"wires":[["b9d2a0949be738b3"]]},{"id":"b9d2a0949be738b3","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":2260,"y":100,"wires":[["df42d9c5877624a4"]]},{"id":"dd2c4733d09a5c42","type":"trigger","z":"c61f5f14cee188f7","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1880,"y":100,"wires":[["38eaf42d0f2df585"]]},{"id":"83055e2f7cbc4230","type":"api-call-service","z":"c61f5f14cee188f7","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"{\"position\":0}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2510,"y":360,"wires":[[]]},{"id":"333ebd220ee248b2","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":2260,"y":360,"wires":[["83055e2f7cbc4230"]]},{"id":"df42d9c5877624a4","type":"api-call-service","z":"c61f5f14cee188f7","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2510,"y":100,"wires":[[]]},{"id":"af656c9ea78a9795","type":"api-call-service","z":"c61f5f14cee188f7","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"{\"position\":0}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1250,"y":80,"wires":[[]]},{"id":"8d15548de6996381","type":"template","z":"c61f5f14cee188f7","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"subtitle\": \"{{count}}% open\",\n \"value\": {{count}},\n \"state\": \"inactive\",\n \"content\": {\n \"icon\": \"shades\"\n }\n }\n}","output":"json","x":1860,"y":160,"wires":[[]]},{"id":"3a29580e5dd0afa6","type":"template","z":"c61f5f14cee188f7","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"subtitle\": \"Closed\",\n \"state\": \"active\",\n \"value\": 0\n }\n}","output":"json","x":1860,"y":360,"wires":[["333ebd220ee248b2"]]},{"id":"f064a15b56be3678","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":200,"wires":[["b7b4fc80389b9c51"]]},{"id":"0cdb4b96deace082","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"button_id","pt":"msg","to":"button_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":210,"y":200,"wires":[["416eeb8d48e07b64","c9950e20c4eaf59e"]]},{"id":"08aa987ebac2292a","type":"switch","z":"c61f5f14cee188f7","name":"id","property":"payload.event.id","propertyType":"msg","rules":[{"t":"eq","v":"button_id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":590,"y":120,"wires":[["57d30a428019dee5"]]},{"id":"c9950e20c4eaf59e","type":"switch","z":"c61f5f14cee188f7","name":"push/poll?","property":"topic","propertyType":"msg","rules":[{"t":"neq","v":"newconfig","vt":"str"},{"t":"eq","v":"newconfig","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":200,"wires":[["085702536437fc16"],["19a0405340e84dbb"]]},{"id":"19a0405340e84dbb","type":"change","z":"c61f5f14cee188f7","name":"","rules":[{"t":"set","p":"state_entity","pt":"msg","to":"state_entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":300,"wires":[["a793bbb697aeb3ba"]]},{"id":"a793bbb697aeb3ba","type":"api-current-state","z":"c61f5f14cee188f7","name":"","server":"133947b6.b167e8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"{{state_entity}}","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":720,"y":300,"wires":[["a1f46f1c4bb1213f"]]},{"id":"a1f46f1c4bb1213f","type":"change","z":"c61f5f14cee188f7","name":"change","rules":[{"t":"move","p":"data.attributes.current_position","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":300,"wires":[["b7b4fc80389b9c51"]]},{"id":"6a3f7eff0c46b092","type":"template","z":"c61f5f14cee188f7","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"subtitle\": \"{{count}}% open\",\n \"value\": {{count}},\n \"state\": \"active\",\n \"content\": {\n \"icon\": \"shades\"\n }\n }\n}","output":"json","x":1860,"y":220,"wires":[[]]},{"id":"c0927001606514f0","type":"subflow","name":"HALO LIGHT","info":"","category":"","in":[{"x":160,"y":500,"wires":[{"id":"f34706a3ed00283f"}]}],"out":[{"x":2380,"y":500,"wires":[{"id":"62028cd86b2c6b48","port":0},{"id":"2d6a9b7fbfcafde0","port":0}]}],"env":[{"name":"entity_id","type":"str","value":"light."},{"name":"button_id","type":"str","value":"uuid"}],"meta":{},"color":"#DDAA99"},{"id":"77b06a19.ec31a4","type":"switch","z":"c0927001606514f0","name":"direction","property":"payload.event.counts","propertyType":"msg","rules":[{"t":"lt","v":"-2","vt":"str"},{"t":"eq","v":"+1","vt":"num"},{"t":"eq","v":"-1","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":1240,"y":500,"wires":[["8ce373d8a42af0a9"],["244aa6da3715d5a3"],["e40b3bafbfb87216"]]},{"id":"bd4de52a55373982","type":"counter","z":"c0927001606514f0","name":"","init":"0","step":"1","lower":"0","upper":"100","mode":"decrement","outputs":"1","x":1700,"y":500,"wires":[["2c8225fc11099884"]]},{"id":"e40b3bafbfb87216","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"decrement","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1450,"y":520,"wires":[["bd4de52a55373982"]]},{"id":"bbda1c4a18c47bee","type":"range","z":"c0927001606514f0","minin":"1","maxin":"255","minout":"0","maxout":"100","action":"scale","round":true,"property":"reset","name":"","x":1560,"y":680,"wires":[["bd4de52a55373982"]]},{"id":"244aa6da3715d5a3","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"increment","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1450,"y":480,"wires":[["bd4de52a55373982"]]},{"id":"1f320649339f9b8a","type":"switch","z":"c0927001606514f0","name":"filter wheel","property":"payload.event.type","propertyType":"msg","rules":[{"t":"eq","v":"wheel","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":500,"wires":[["fc59a01218f8176e"],[]]},{"id":"a007608b2d5124ed","type":"switch","z":"c0927001606514f0","name":"allow bri","property":"data.new_state.attributes.brightness","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"}],"checkall":"true","repair":false,"outputs":1,"x":880,"y":680,"wires":[["652c84bc5aa9e15d"]]},{"id":"652c84bc5aa9e15d","type":"rbe","z":"c0927001606514f0","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"data.new_state.attributes.brightness","topi":"topic","x":1070,"y":680,"wires":[["42652bc594d48790"]]},{"id":"d2bc746e7838aada","type":"api-call-service","z":"c0927001606514f0","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1710,"y":440,"wires":[[]]},{"id":"8ce373d8a42af0a9","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":1440,"y":440,"wires":[["d2bc746e7838aada"]]},{"id":"f8b0d74a4ef194bc","type":"switch","z":"c0927001606514f0","name":"if off/on","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":640,"y":600,"wires":[["d65aa07bc9e9c318","9f73dc3b7e06c0ef"],["a007608b2d5124ed"]]},{"id":"62028cd86b2c6b48","type":"template","z":"c0927001606514f0","name":">0","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"state\": \"active\",\n \"subtitle\": \"{{count}} %\",\n \"value\": {{count}},\n \"content\": {\n \"icon\": \"lights\"\n }\n }\n}","output":"json","x":2270,"y":480,"wires":[[]]},{"id":"7a03e42bb8bc69d1","type":"switch","z":"c0927001606514f0","name":"","property":"count","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":2070,"y":500,"wires":[["62028cd86b2c6b48","2053a563e31270ca"],["2d6a9b7fbfcafde0","421307024b445ba7"]]},{"id":"7849afe0f00a045e","type":"function","z":"c0927001606514f0","name":"set brightness_pct","func":"msg.payload = {\n data: {\n brightness_pct: msg.count,\n transition: 0.4\n }\n};\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":2510,"y":420,"wires":[["936b867da1e8d14c"]]},{"id":"936b867da1e8d14c","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":2720,"y":420,"wires":[["30f4a492179a43df"]]},{"id":"30f4a492179a43df","type":"api-call-service","z":"c0927001606514f0","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2910,"y":420,"wires":[[]]},{"id":"2053a563e31270ca","type":"trigger","z":"c0927001606514f0","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2300,"y":420,"wires":[["7849afe0f00a045e"]]},{"id":"15fc8354380f4093","type":"api-call-service","z":"c0927001606514f0","name":"","server":"133947b6.b167e8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["{{entity}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2490,"y":580,"wires":[[]]},{"id":"421307024b445ba7","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":2300,"y":580,"wires":[["15fc8354380f4093"]]},{"id":"42652bc594d48790","type":"trigger","z":"c0927001606514f0","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"3","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1240,"y":640,"wires":[["ae6ac7698c641a0e"]]},{"id":"2d6a9b7fbfcafde0","type":"template","z":"c0927001606514f0","name":"=0","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"update\": {\n \"type\": \"button\",\n \"id\": \"{{button_id}}\",\n \"value\": 0,\n \"subtitle\": \"Off\" ,\n \"state\": \"inactive\"\n }\n}","output":"json","x":2270,"y":520,"wires":[[]]},{"id":"fc59a01218f8176e","type":"switch","z":"c0927001606514f0","name":"filter id","property":"payload.event.id","propertyType":"msg","rules":[{"t":"eq","v":"button_id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":1080,"y":500,"wires":[["77b06a19.ec31a4"]]},{"id":"f34706a3ed00283f","type":"change","z":"c0927001606514f0","name":"set button id","rules":[{"t":"set","p":"button_id","pt":"msg","to":"button_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":500,"wires":[["ea744899648db08d","1f320649339f9b8a"]]},{"id":"ea744899648db08d","type":"switch","z":"c0927001606514f0","name":"push/poll?","property":"topic","propertyType":"msg","rules":[{"t":"neq","v":"newconfig","vt":"str"},{"t":"eq","v":"newconfig","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":700,"wires":[["f8b0d74a4ef194bc"],["98495a50c3b037a8"]]},{"id":"8164fc080f7c033d","type":"api-current-state","z":"c0927001606514f0","name":"","server":"133947b6.b167e8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"{{entity}}","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1120,"y":720,"wires":[["23d7faac2c6528a8"]]},{"id":"98495a50c3b037a8","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"set","p":"entity","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":720,"wires":[["8164fc080f7c033d"]]},{"id":"23d7faac2c6528a8","type":"function","z":"c0927001606514f0","name":"set bri","func":"msg.reset = msg.data.attributes.brightness;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1410,"y":720,"wires":[["bbda1c4a18c47bee"]]},{"id":"ae6ac7698c641a0e","type":"function","z":"c0927001606514f0","name":"set bri","func":"msg.reset = msg.data.new_state.attributes.brightness;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1410,"y":640,"wires":[["bbda1c4a18c47bee"]]},{"id":"d65aa07bc9e9c318","type":"function","z":"c0927001606514f0","name":"set bri = 0","func":"msg.reset = 0;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1420,"y":600,"wires":[["bd4de52a55373982"]]},{"id":"2c8225fc11099884","type":"change","z":"c0927001606514f0","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1900,"y":500,"wires":[["7a03e42bb8bc69d1"]]},{"id":"9f73dc3b7e06c0ef","type":"change","z":"c0927001606514f0","name":"reset trigger","rules":[{"t":"set","p":"reset","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":640,"wires":[["42652bc594d48790"]]},{"id":"c1c740d00cdfd8e4","type":"tab","label":"Flow 5","disabled":false,"info":"","env":[]},{"id":"fd64f4d43ff82fe9","type":"group","z":"c1c740d00cdfd8e4","style":{"stroke":"#839496","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#839496"},"nodes":["716bbf62890b881e","6699d3f293993db5","2fd9f0454c2e88dc","5c5332d0579898f0","dacb47742a6f133a","2b34cb2488daf3f9","118443669598ebd9","4ead83a719833d16","60824d3741141641","48c41c6b24b86e05","3e42df0497740126","7f3f4d87235e8021","5308ef21a8c846ba","4a758735324de8ef","9bedebfe370c7eb9","232e3a4d617cc832","d704df6e7462599f","8716483e1795fdd3","10ab62f3ff804147","01f579a3290d886c","5852ad80a138eaca","4b4c10d1193bc29c","ebeb1c8bdc3fa428","728c9a05dcdded64","683de10dd1b20b95","41fb87cda2608fd3","72d9d412d1c356ee"],"x":94,"y":139,"w":2132,"h":342},{"id":"189eff66e3182c8b","type":"comment","z":"c1c740d00cdfd8e4","name":"Change entity from HA","info":"","x":220,"y":540,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"a1a171c8d438d694","type":"server-state-changed","z":"c1c740d00cdfd8e4","name":"","server":"133947b6.b167e8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"light.living_room","entityIdType":"exact","outputInitially":true,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":310,"y":580,"wires":[["ec265487ea482783"]]},{"id":"9d849e533bc5c400","type":"link in","z":"c1c740d00cdfd8e4","name":"Msg from Halo","links":["2b34cb2488daf3f9","5308ef21a8c846ba"],"x":200,"y":640,"wires":[["ec265487ea482783"]],"l":true},{"id":"ec265487ea482783","type":"subflow:c0927001606514f0","z":"c1c740d00cdfd8e4","name":"","env":[{"name":"entity_id","value":"light.living_room","type":"str"},{"name":"button_id","value":"497f6eca-6276-4993-bfeb-53cbbbba6f03","type":"str"},{"name":"adaptiveswitch","value":"switch.adaptive_lighting_adapt_brightness_living_room","type":"str"}],"x":750,"y":580,"wires":[["bbaf68d54ab339b4"]]},{"id":"bbaf68d54ab339b4","type":"link out","z":"c1c740d00cdfd8e4","name":"To Halo","mode":"link","links":["ebeb1c8bdc3fa428"],"x":1140,"y":600,"wires":[],"l":true},{"id":"57bbafa8db4fb6c1","type":"comment","z":"c1c740d00cdfd8e4","name":"Doubleclick - Change entity and button id","info":"","x":780,"y":540,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"10787a800930face","type":"subflow:c61f5f14cee188f7","z":"c1c740d00cdfd8e4","name":"","env":[{"name":"entity_id","value":"cover.shade_living_room_right","type":"str"},{"name":"button_id","value":"0eeed91c-4407-4837-bd9c-e41d9457ffa9","type":"str"},{"name":"state_entity_id","value":"cover.living_room_south_right","type":"str"}],"x":760,"y":860,"wires":[["51510adfa9a662eb"]]},{"id":"458f94d8bf3bbf36","type":"server-state-changed","z":"c1c740d00cdfd8e4","name":"","server":"133947b6.b167e8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"cover.shade_living_room_right","entityIdType":"exact","outputInitially":true,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":350,"y":860,"wires":[["10787a800930face"]]},{"id":"51510adfa9a662eb","type":"link out","z":"c1c740d00cdfd8e4","name":"To Halo","mode":"link","links":["ebeb1c8bdc3fa428"],"x":1140,"y":860,"wires":[],"l":true},{"id":"2fc2a6e142a871a8","type":"link in","z":"c1c740d00cdfd8e4","name":"Msg from Halo","links":["2b34cb2488daf3f9","5308ef21a8c846ba"],"x":200,"y":920,"wires":[["10787a800930face"]],"l":true},{"id":"7571c28635054b9e","type":"subflow:78d02f13a11aabd3","z":"c1c740d00cdfd8e4","name":"","env":[{"name":"entity_id","value":"climate.thermostat_living_room_south","type":"str"},{"name":"button_id","value":"e83a53c2-68b0-4dd8-8446-378bbddf766c","type":"str"},{"name":"state_entity_id","value":"climate.thermostat_living_room_south","type":"str"}],"x":780,"y":720,"wires":[["4db773ff1af1d38f"]]},{"id":"38b222d4cf60fec3","type":"server-state-changed","z":"c1c740d00cdfd8e4","name":"","server":"133947b6.b167e8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"climate.thermostat_living_room_south","entityIdType":"exact","outputInitially":true,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":380,"y":720,"wires":[["7571c28635054b9e"]]},{"id":"4db773ff1af1d38f","type":"link out","z":"c1c740d00cdfd8e4","name":"To Halo","mode":"link","links":["ebeb1c8bdc3fa428"],"x":1140,"y":720,"wires":[],"l":true},{"id":"0394381627f6c4d2","type":"link in","z":"c1c740d00cdfd8e4","name":"Msg from Halo","links":["2b34cb2488daf3f9","5308ef21a8c846ba"],"x":200,"y":780,"wires":[["7571c28635054b9e"]],"l":true},{"id":"7493b19041efde6b","type":"comment","z":"c1c740d00cdfd8e4","name":"Doubleclick - Change entity and button id","info":"","x":780,"y":680,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"8014a8a221f4d11d","type":"comment","z":"c1c740d00cdfd8e4","name":"Change entity from HA","info":"","x":220,"y":680,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"33ebca104566a29c","type":"comment","z":"c1c740d00cdfd8e4","name":"Doubleclick - Change entity and button id","info":"","x":780,"y":820,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"11e1ac52551784ea","type":"comment","z":"c1c740d00cdfd8e4","name":"Change entity from HA","info":"","x":220,"y":820,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"716bbf62890b881e","type":"template","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"PRIMARY","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"configuration\": {\n \"version\": \"1.0.1\",\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f01\",\n \"pages\": [\n {\n \"title\": \"Living room\",\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f02\",\n \"buttons\": [\n {\n \"id\": \"0eeed91c-4407-4837-bd9c-e41d9457ffa9\",\n \"title\": \"Shades\",\n \"subtitle\": \"Unknown\",\n \"content\": {\n \"icon\": \"shades\"\n },\n \"state\": \"inactive\",\n \"value\": 0\n },\n {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f03\",\n \"value\": 0,\n \"title\": \"Stue\",\n \"subtitle\": \"0%\",\n \"content\": {\n \"icon\": \"alternative\"\n },\n \"state\": \"inactive\",\n \"default\": true\n }, \n\n\n {\n \"id\": \"e83a53c2-68b0-4dd8-8446-378bbddf766c\",\n \"title\": \"Climate\",\n \"subtitle\": \"Unknown\",\n \"content\": {\n \"icon\": \"heat\"\n },\n \"state\": \"inactive\",\n \"value\": 0\n }\n ] \n }\n ]\n }\n}","output":"json","x":1400,"y":320,"wires":[["7f3f4d87235e8021"]]},{"id":"6699d3f293993db5","type":"switch","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"if not configured","property":"payload.event.message","propertyType":"msg","rules":[{"t":"eq","v":"Not configured","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":820,"y":320,"wires":[["2fd9f0454c2e88dc"]]},{"id":"2fd9f0454c2e88dc","type":"delay","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1000,"y":320,"wires":[["60824d3741141641"]]},{"id":"5c5332d0579898f0","type":"switch","z":"c1c740d00cdfd8e4","d":true,"g":"fd64f4d43ff82fe9","name":"If active","property":"payload.event.state","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":800,"y":360,"wires":[["dacb47742a6f133a"]]},{"id":"dacb47742a6f133a","type":"change","z":"c1c740d00cdfd8e4","d":true,"g":"fd64f4d43ff82fe9","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"_session","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"Motion sensed","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":360,"wires":[["41fb87cda2608fd3"]]},{"id":"2b34cb2488daf3f9","type":"link out","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Update entities state","mode":"link","links":["9d849e533bc5c400","0394381627f6c4d2","2fc2a6e142a871a8","aeffdd7ed737fe6c","a3783f1939748c35"],"x":1980,"y":200,"wires":[],"l":true},{"id":"118443669598ebd9","type":"delay","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":820,"y":280,"wires":[["2fd9f0454c2e88dc"]]},{"id":"4ead83a719833d16","type":"switch","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Event type","property":"payload.event.type","propertyType":"msg","rules":[{"t":"eq","v":"status","vt":"str"},{"t":"eq","v":"system","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":630,"y":340,"wires":[["6699d3f293993db5"],["5c5332d0579898f0"]]},{"id":"60824d3741141641","type":"change","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"","rules":[{"t":"delete","p":"_session","pt":"msg"},{"t":"delete","p":"topic","pt":"msg"},{"t":"delete","p":"attributes","pt":"msg"},{"t":"delete","p":"id","pt":"msg"},{"t":"delete","p":"node_id","pt":"msg"},{"t":"set","p":"topic","pt":"msg","to":"newconfig","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":320,"wires":[["716bbf62890b881e"]]},{"id":"48c41c6b24b86e05","type":"inject","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Keep-alive","props":[{"p":"payload"}],"repeat":"30","crontab":"","once":false,"onceDelay":"5","topic":"","payload":"{\"update\":{\"type\":\"button\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f03\"}}","payloadType":"json","x":1830,"y":360,"wires":[["3e42df0497740126"]]},{"id":"3e42df0497740126","type":"websocket out","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"websocket out halo","server":"9f6482be2baae21c","client":"","x":2110,"y":320,"wires":[]},{"id":"7f3f4d87235e8021","type":"switch","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"is newconfig","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"newconfig","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1570,"y":320,"wires":[["4b4c10d1193bc29c","2b34cb2488daf3f9"]]},{"id":"5308ef21a8c846ba","type":"link out","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Msg from Halo to buttons","mode":"link","links":["9d849e533bc5c400","0394381627f6c4d2","2fc2a6e142a871a8","aeffdd7ed737fe6c","a3783f1939748c35"],"x":850,"y":440,"wires":[],"l":true},{"id":"4a758735324de8ef","type":"json","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"","property":"payload","action":"","pretty":false,"x":460,"y":340,"wires":[["5308ef21a8c846ba","4ead83a719833d16","9bedebfe370c7eb9"]]},{"id":"9bedebfe370c7eb9","type":"debug","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"feedback","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":800,"y":400,"wires":[]},{"id":"232e3a4d617cc832","type":"websocket in","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Halo websocket in","server":"9f6482be2baae21c","client":"","x":270,"y":340,"wires":[["4a758735324de8ef"]]},{"id":"d704df6e7462599f","type":"status","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"","scope":["232e3a4d617cc832"],"x":240,"y":280,"wires":[["72d9d412d1c356ee"]]},{"id":"8716483e1795fdd3","type":"switch","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"connected","property":"status.text","propertyType":"msg","rules":[{"t":"eq","v":"connected ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":630,"y":280,"wires":[["118443669598ebd9"]]},{"id":"10ab62f3ff804147","type":"comment","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Change websocket IP","info":"","x":240,"y":380,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"01f579a3290d886c","type":"comment","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"point status node to 'websocket in'","info":"","x":260,"y":240,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"5852ad80a138eaca","type":"comment","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Change websocket","info":"","x":2110,"y":280,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"4b4c10d1193bc29c","type":"change","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"delete topic","rules":[{"t":"delete","p":"topic","pt":"msg"},{"t":"delete","p":"_msgid","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1830,"y":320,"wires":[["3e42df0497740126"]]},{"id":"ebeb1c8bdc3fa428","type":"link in","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Msg from buttons to Halo","links":["bbaf68d54ab339b4","aa804f88c2d37233","51510adfa9a662eb","4db773ff1af1d38f","be455d2b780a853e"],"x":1530,"y":440,"wires":[["4b4c10d1193bc29c"]],"l":true},{"id":"728c9a05dcdded64","type":"comment","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Main configuration here!","info":"","x":1390,"y":280,"wires":[],"icon":"node-red-contrib-modbus/modbus-icon.png"},{"id":"683de10dd1b20b95","type":"inject","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"Manually send config","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":840,"y":180,"wires":[["60824d3741141641"]]},{"id":"41fb87cda2608fd3","type":"debug","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"\"Motion sensing\"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1230,"y":360,"wires":[]},{"id":"72d9d412d1c356ee","type":"switch","z":"c1c740d00cdfd8e4","g":"fd64f4d43ff82fe9","name":"connected","property":"status.text","propertyType":"msg","rules":[{"t":"eq","v":"connected ","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":280,"wires":[["118443669598ebd9"],[]]},{"id":"133947b6.b167e8","type":"server","name":"CK Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"9f6482be2baae21c","type":"websocket-listener","path":"ws://192.168.100.141:8080","wholemsg":"false"}]