mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-10-26 22:52:55 +00:00
Add Device.supports_module() and stop querying HomeKit for iot devices (#1808)
Some legacy iot firmware stops responding when an unsupported module follows `system` in a request, which made every update time out once the HomeKit query was added. This stops querying HomeKit in `update()` for IOT devices and adds `Device.supports_module()` API to allow checking if some module is supported by the device.
This commit is contained in:
@@ -29,7 +29,6 @@ from .modules import (
|
||||
Cloud,
|
||||
Countdown,
|
||||
Emeter,
|
||||
HomeKit,
|
||||
Led,
|
||||
Schedule,
|
||||
Time,
|
||||
@@ -122,7 +121,6 @@ class IotStrip(IotDevice):
|
||||
self.add_module(Module.IotCountdown, Countdown(self, "countdown"))
|
||||
self.add_module(Module.Led, Led(self, "system"))
|
||||
self.add_module(Module.IotCloud, Cloud(self, "cnCloud"))
|
||||
self.add_module(Module.IotHomeKit, HomeKit(self, "smartlife.iot.homekit"))
|
||||
if self.has_emeter:
|
||||
_LOGGER.debug(
|
||||
"The device has emeter, querying its information along sysinfo"
|
||||
|
||||
Reference in New Issue
Block a user