Home Assistant Node Red Sync Multiple Dimmer LEDs Subflow Code

Hey everyone,

I built this subflow that you can use to sync the LED power notification in 3-way, 4-way, 5-way, and 6-way(!) circuits with Inovelli dimmer switches.

23%20AM

I decided to make a subflow after I read the article about the limitations of using two Inovelli switches in the same circuit and saw that keeping the LEDs synced was ‘a pain’. I am hoping this will fix that. It’s a simple one node automation wrapped in a subflow.

To use, got to node red in Home Assistant, in the upper left hamburger, select import. Copy and paste the code below to get the subflow. The subflow has no inputs or outputs, only settable properties within the node configuration panel.

[{"id":"d96724e3.836008","type":"subflow","name":"Sync Inovelli Aux Switches","info":"This syncs up to four aux Inovelli light switch displays to match the load switches display which does not happen natively when only doing a z-wave association. \n\n**Variables**\n\n_LOAD_LTSW_: Load Light Switch _(light.inovell.xxx)_ This is the switch that is physically hooked into the light.\n\n_AUX_LTSW_1_: Aux Light Switch 1 - The aux light to receive the updated display settings\n\n_AUX_LTSW_2_: Aux Light Switch 2 - The aux light to receive the updated display settings\n\n_AUX_LTSW_3_: Aux Light Switch 3 - The aux light to receive the updated display settings\n\n_AUX_LTSW_4_: Aux Light Switch 4 - The aux light to receive the updated display settings\n\n**Display Note**\n\n- The dimmer has a delay with syncing the two but is better than no status\n- Make sure that min, max, dimmer speed, and ramp speeds are the same on the two switches if you would like a similar display experience. (Feel free to tweak these)\n- This only syncs up power levels to the stitches, it does not sync up notifications\n\n**Tested with**\n\nTwo Inovelli Red Dimmer switches. One (LOAD_LTSW) set up with a neutral, line, and load to the light fixture. The other as an aux (AUX_LTSW_1) switch with line and neutral. The aux switch has a disabled relay via the 8 tap config. It was then paired with the load switch via Z-Wave association levels 2 and 4.\n","category":"","in":[],"out":[],"env":[{"name":"LOAD_LTSW","type":"str","value":"light.XXXX"},{"name":"AUX_LTSW_1","type":"str","value":"light.XXXX"},{"name":"AUX_LTSW_2","type":"str","value":""},{"name":"AUX_LTSW_3","type":"str","value":""},{"name":"AUX_LTSW_4","type":"str","value":""}],"color":"#DDAA99"},{"id":"45fbdaae.f19114","type":"switch","z":"d96724e3.836008","name":"Off Or 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":340,"y":160,"wires":[["6d5aaac4.17c944"],["cf80bdd7.a444f"]]},{"id":"6d5aaac4.17c944","type":"switch","z":"d96724e3.836008","name":"Check if Off","property":"data.event.old_state.state","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":140,"wires":[["6b0a10b6.10f11"]]},{"id":"cf80bdd7.a444f","type":"switch","z":"d96724e3.836008","name":"Check If Brightness Changed","property":"data.event.old_state.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"data.event.new_state.attributes.brightness","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":570,"y":200,"wires":[["73e8d889.509f98"]]},{"id":"10a97db9.63c132","type":"api-call-service","z":"d96724e3.836008","name":"Execute Aux 1 Switch Change","server":"4bb72555.c1300c","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"$(AUX_LTSW_1)","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":80,"wires":[[]]},{"id":"73e8d889.509f98","type":"change","z":"d96724e3.836008","name":"Set Message for On Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"domain\": \"light\",\t \"service\": \"turn_on\",\t \"data\": {\t \"brightness\": msg.data.event.new_state.attributes.brightness\t }\t}\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":200,"wires":[["ece89149.fd896","db47b895.c04338","3adb8892.a6e898","66b9b556.3a0c4c"]]},{"id":"6b0a10b6.10f11","type":"change","z":"d96724e3.836008","name":"Set Message for Off Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"domain\": \"light\",\t \"service\": \"turn_off\"\t}\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":140,"wires":[["ece89149.fd896","db47b895.c04338","3adb8892.a6e898","66b9b556.3a0c4c"]]},{"id":"ece89149.fd896","type":"switch","z":"d96724e3.836008","name":"If Aux Sw 1","property":"$(AUX_LTSW_1)","propertyType":"env","rules":[{"t":"nnull"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":80,"wires":[["10a97db9.63c132"]]},{"id":"e7ba97aa.10afd8","type":"api-call-service","z":"d96724e3.836008","name":"Execute Aux 2 Switch Change","server":"4bb72555.c1300c","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"$(AUX_LTSW_2)","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":140,"wires":[[]]},{"id":"db47b895.c04338","type":"switch","z":"d96724e3.836008","name":"If Aux Sw 2","property":"$AUX_LTSW_2","propertyType":"env","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":140,"wires":[["e7ba97aa.10afd8"]]},{"id":"a96ceb2b.7a47c8","type":"api-call-service","z":"d96724e3.836008","name":"Execute Aux 3 Switch Change","server":"4bb72555.c1300c","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"$(AUX_LTSW_3)","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":200,"wires":[[]]},{"id":"3adb8892.a6e898","type":"switch","z":"d96724e3.836008","name":"If Aux Sw 3","property":"$AUX_LTSW_3","propertyType":"env","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":200,"wires":[["a96ceb2b.7a47c8"]]},{"id":"f6b238ca.137308","type":"api-call-service","z":"d96724e3.836008","name":"Execute Aux 4 Switch Change","server":"4bb72555.c1300c","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"$(AUX_LTSW_4)","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":260,"wires":[[]]},{"id":"66b9b556.3a0c4c","type":"switch","z":"d96724e3.836008","name":"If Aux Sw 4","property":"$AUX_LTSW_4","propertyType":"env","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":260,"wires":[["f6b238ca.137308"]]},{"id":"90121ca.7e8c9e","type":"trigger-state","z":"d96724e3.836008","name":"","server":"4bb72555.c1300c","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"$(LOAD_LTSW)","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":220,"y":100,"wires":[["45fbdaae.f19114"],[]]},{"id":"4bb72555.c1300c","type":"server","z":"","name":"Home Assistant","addon":true}]

There is a slight delay syncing the two LED bars so if anyone has any ideas on how to optimize that, please let me know!

Love to hear comments, what’s broken, what could be better and see any enhancements people do.

Thanks!

3 Likes