InovelliUSA / Hubitat

Location for Inovelli Hubitat Drivers and Apps
Apache License 2.0
104 stars 50 forks source link

LZW36 - Extra Child Devices #41

Closed jvmahon closed 4 years ago

jvmahon commented 4 years ago

When I add the LZW36 to Hubitat, it is initally installed with the "Inovelli Fan/Light Switch Driver" with two child devices "Fan" and "light".

When I then change to the custom driver from this github forum, I end up with 4 child devices as shown below. Only the new ones "Inovelli Fan/Light Switch (Fan)" and ""Inovelli Fan/Light Switch (Light)" are functional. It appears that when switching drivers, the new driver adds it's child devices, but "forgets" to remove any existing ones. Please fix this!

Hub version: 2.2.3.119 Firmware: Happens on both 1.31 and the beta 1.36.

See image below:

image

jvmahon commented 4 years ago

I took a further look at the .groovy code for the driver.

My assumption is that, on first-time setup, the LZW36 driver code should use the getChildDevices and deleteChildDevice methods to remove any child devices left over from a prior driver. It looks like the code is getting rid of some child devices, but only if they start with the prefix "ep".

Maybe, and this is a wild guess, you need to use getChildDevices during initialization to see if there are child devices that start with prefixes other than "ep" and get rid of those too.

jvmahon commented 4 years ago

It looks like an update has been posted. I'll give that a try and close this comment if it now works.

jvmahon commented 4 years ago

This seems to work as of the 2020-08-27 release. Thanks!