Closed Jon8RFC closed 3 years ago
I will update the code in a week or two: Commands: Agree with your adding getSysInfo distResp: Will remove: "} else if (response.system.set_led_off.err_code != 0) {' and below. setSysInfo: Will use: def ledOnOff = "on" if (status.led_off == 1) { ledOnOff = "off" } if (ledOnOff != device.currentValue("led")) { sendEvent(name: "led", value: ledOnOff) logInfo("setSysInfo: Led On/Off = ${ledOnOff}") }
Thanks for the heads-up.
Version 6.3.3 of the drivers and app have been updated on GitHub and linked to Hubitat Package Manager (HPM). These changes reflect the issues discussed in your changes.
Thank you very much for raising the issue and providing a solution.
Dave
This revision supersedes #13. These code changes correct the LED status problem by actually querying the LED status and adjusting the attribute appropriately. The device LED status displayed on Hubitat now functions correctly, despite the number of successive clicks.
Item 4 isn't in every driver file, but it's in many of them. For example: https://github.com/DaveGut/HubitatActive/blob/8fa64a30e97d5310faa27e3a58933ff824f7b454/KasaDevices/DeviceDrivers/Plug-Switch.groovy#L809