I kinda got this working 100%, but it involves Shelly, Homeassistant, node red and a third party wifi canopy module.
I bought this module, hooked it up at the fan canopy, integrated it with LocalTuya to homeassistant, Then I created rules in node red to set the switch led status to whatever the LocalTuya integration said (so if fan is at level 2, set led bar to 66% for fan button, etc). Then I created rules for the switch to control the fan through the wifi integration.
After this, I still had trouble with the canopy losing connection to wifi about once a day, so I put a Shelly 1 in the canopy to cut power whenever homeassistant detects that the fan is offline, waits 5 seconds and turns fan back on. It’s a bit convoluted but right now it works 100% of the time. I’ll update this post tomorrow with my node red nodes and the Shelly / homeassistant automation.
UPDATE:
Here’s the automation built off of this HA Blueprint for using the Fan/Light Switch Combo as a remote for the WiFi Canopy Module I bought:
alias: Inovelli Red Series LZW36 Fan Controller (ZWave-JS)
description: ''
use_blueprint:
path: cree8/zwave-js-inovelli-lzw36-fan-switch-dimmer.yaml
input:
inovelli_fan_switch: cb4b3a7ce7914f333cdb1d7c2b4d7906
button_a:
- service: switch.toggle
target:
entity_id: switch.fanlight
data: {}
button_b:
- service: fan.toggle
target:
entity_id: fan.fanmotor
data: {}
button_c1:
- service: light.turn_on
target:
entity_id: light.terrace_light
data:
transition: 0
button_d1:
- service: fan.increase_speed
target:
entity_id: fan.fanmotor
data:
percentage_step: 33
button_d2:
- service: fan.decrease_speed
target:
entity_id: fan.fanmotor
data:
percentage_step: 34
button_c2:
- service: light.turn_off
target:
entity_id: light.terrace_light
data:
transition: 0
Heres the node red node for keeping the wifi canopy module in sync with the Fan/Light Switch Combo
[{"id":"b3e69747953883c1","type":"group","z":"3a01aa28c5e0e8cc","name":"Terrace Fan Light","style":{"stroke":"#ffff00","label":true},"nodes":["d619de7099b28982","97fe7a7250acbfff","98b279674d21b48e","058122ef4842422b","141a36787a3087b3","3a56795bfb6c1992","ad783a33b3397031","a4630faa9e894a97","667442cdffab269e","1e01ecd73445a539"],"x":44,"y":279,"w":942,"h":442},{"id":"d619de7099b28982","type":"server-state-changed","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan Light Real","server":"4afd04e8.07ab4c","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.fanlight","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":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":140,"y":340,"wires":[["97fe7a7250acbfff"],["98b279674d21b48e"]]},{"id":"97fe7a7250acbfff","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan Light Fake on","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.red_series_fan_light_switch_2"],"data":"{\"brightness\": 255}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":320,"wires":[[]]},{"id":"98b279674d21b48e","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan Light Fake off","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.red_series_fan_light_switch_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":380,"wires":[[]]},{"id":"058122ef4842422b","type":"server-state-changed","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan Light Real","server":"4afd04e8.07ab4c","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"fan.fanmotor","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":460,"wires":[["141a36787a3087b3","1e01ecd73445a539"],["667442cdffab269e"]]},{"id":"141a36787a3087b3","type":"switch","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Switch","property":"data.new_state.attributes.speed","propertyType":"msg","rules":[{"t":"eq","v":"high","vt":"str"},{"t":"eq","v":"medium","vt":"str"},{"t":"eq","v":"low","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":350,"y":440,"wires":[["3a56795bfb6c1992"],["ad783a33b3397031"],["a4630faa9e894a97"]]},{"id":"3a56795bfb6c1992","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan fake High","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"fan","service":"set_speed","areaId":[],"deviceId":[],"entityId":["fan.red_series_fan_light_switch_2"],"data":"{\"speed\": \"high\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":440,"wires":[[]]},{"id":"ad783a33b3397031","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan fake medium","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"fan","service":"set_speed","areaId":[],"deviceId":[],"entityId":["fan.red_series_fan_light_switch_2"],"data":"{\"speed\": \"medium\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":500,"wires":[[]]},{"id":"a4630faa9e894a97","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan fake low","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"fan","service":"set_speed","areaId":[],"deviceId":[],"entityId":["fan.red_series_fan_light_switch_2"],"data":"{\"speed\": \"low\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":560,"wires":[[]]},{"id":"667442cdffab269e","type":"api-call-service","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"Fan fake off","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"fan","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.red_series_fan_light_switch_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":590,"y":580,"wires":[[]]},{"id":"1e01ecd73445a539","type":"debug","z":"3a01aa28c5e0e8cc","g":"b3e69747953883c1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data.new_state.attributes.speed","targetType":"msg","statusVal":"","statusType":"auto","x":430,"y":680,"wires":[]},{"id":"4afd04e8.07ab4c","type":"server","name":"Home Assistant","version":2,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
Here’s the node red node for rebooting the Wifi Fan Canopy if it ever comes offline.
[{"id":"f3f8cc02529ccb7a","type":"group","z":"76653493.fb3d1c","name":"Terrace Fan Reboot","style":{"label":true,"stroke":"#bfdbef"},"nodes":["9d9a24ba534ea333","dab855b7fe079df0","547900aa0924d4cd","2906094552d429d4","da3978cd1e1b00b0","fd84119bfae6dd21","2e7862dd4774a80f"],"x":34,"y":3439,"w":1492,"h":82},{"id":"9d9a24ba534ea333","type":"server-state-changed","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"Fan unavailable","server":"4afd04e8.07ab4c","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"fan.fanmotor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":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":140,"y":3480,"wires":[["da3978cd1e1b00b0"],[]]},{"id":"dab855b7fe079df0","type":"api-call-service","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"Turn off Power to Fan","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.terrace_fan_power_switch"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":3480,"wires":[["547900aa0924d4cd"]]},{"id":"547900aa0924d4cd","type":"delay","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":760,"y":3480,"wires":[["2906094552d429d4"]]},{"id":"2906094552d429d4","type":"api-call-service","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"Turn on Power to Fan","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.terrace_fan_power_switch"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":3480,"wires":[["fd84119bfae6dd21"]]},{"id":"da3978cd1e1b00b0","type":"delay","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":340,"y":3480,"wires":[["dab855b7fe079df0"]]},{"id":"fd84119bfae6dd21","type":"delay","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1200,"y":3480,"wires":[["2e7862dd4774a80f"]]},{"id":"2e7862dd4774a80f","type":"api-call-service","z":"76653493.fb3d1c","g":"f3f8cc02529ccb7a","name":"Turn off Fan Light","server":"4afd04e8.07ab4c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.fanlight","switch.terrace_fan_power_switch"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":3480,"wires":[[]]},{"id":"4afd04e8.07ab4c","type":"server","name":"Home Assistant","version":2,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]