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:
Teemu R.
2026-10-24 16:22:33 +02:00
committed by GitHub
parent e29864bfdc
commit 30f5e4a1b9
6 changed files with 130 additions and 18 deletions

View File

@@ -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"