Mirroring Virtual Fan to Physical Fan Controller

Yesterday for unknown reason both my Hampton Bay Zigbee Fan/Light Controllers decided
to drop off Zigbee network (worked flawlessly for 4+ years). I could easily re-pair both of them
back to C8 hub. They seems to be connected but the control is unstable and status report
is absent all together. I guess, I have to first to remove them all together, factory reset and
reinstall back. The problem is - there are two child devices (one for the Fan and second one for
the Lights) which are part of many automations but unfortunately cannot be easy swapped.
To minimize headache in a future I created two virtual devices (Virtual Dimmer and Virtual Fan).
Now for the Dimmer I can use built-in Mirror app. However this Mirror app does not allow
to mirror Virtual Fan (it is not on a list of primary devices) to physical Fan Controller.
I can create an RM rule with many IF-THEN-ELSEIF- statements but my question is:
Is it any elegant solution for this issue?
I can capture Virtual FAN status into String Variable but I did not figure out how to assign
captured value to the physical device. Most likely this is impossible.
Another way will be to create a custom app. Is it any good template to start with?
(I know, there is a lot of custom app examples but I am looking for something very simple one.)
And finally - is anyone willing to create this custom app?
I am sure for SW gurus this is very easy task.

Switch Bindings will do a two-way mirror sync and works for Fan Controllers, in fact I am doing the exact same thing as you for when I was messing around with the User vs System Bond apps.

There is also this Mirror Plus app which IMO I like the UI Better but I think it only does a one-way sync similar to the built in Mirror app.

1 Like

Thank you very much for the links.
Unfortunately neither custom app is ideal.
Built-in Mirror and custom Switch Binding aps for whatever reason do not list Virtual Fan
device but physical Fan devices are present. This makes no sense but it is what it is.
(It will be really nice if this can be fixed.)
Custom "Device Mirror Plus" is working but it is unidirectional and therefore could be easily
desynchronized if dependent device is/was controlled directly. Since my physical Fan Controllers
have a RF Remote in addition to the Zigbee Radio this could be a case.
But sure, this is much better than nothing. Re-synchronization could be achieved by first setting
Fan to something which never will be used/set (specifically from the RF Remote) and than to
whatever is desired by automation.

Switch Bindings can work, I use a customized version of Joel's custom virtual fan driver. referenced in this post: [RELEASE] Switch Bindings - #44 by jwetzel1492

You should be able to just change your existing virtual devices over to this driver. I could share my extra customized version if you feel like his is not working right. I think mainly I added a level % to play nice with some other things.

1 Like

Thanks a lot!
This Fan driver did a trick. Switch Binding works bi-directionally. But out of 5 possible Fan speeds
only 3 (Low, Medium and High) actually supported. Medium-low reverts to Medium and
Medium-high reverts to High. But this is not a big deal and now I am all set.

I believe that’s because the fan controller I was binding, a GE/Jasco unit, only supported the 3 speeds. It shouldn’t be hard to modify the code to support extra levels.

I started updating it with plans to support any number of speeds using a command to change it. Did not finish all the functions though and my fans are all 3 speed so it worked the way it was for me.

Download the Hubitat app