Do not request unsupported modules after the initial update (#298)

* Do not request unsupported modules after the initial update

* debugify logging
This commit is contained in:
Teemu R
2022-01-29 18:15:59 +01:00
parent 8c7b1b4a68
commit 3a7836cd33
2 changed files with 11 additions and 0 deletions

View File

@@ -327,6 +327,9 @@ class SmartDevice:
self.add_module("emeter", Emeter(self, self.emeter_type))
for module in self.modules.values():
if not module.is_supported:
_LOGGER.debug("Module %s not supported, skipping" % module)
continue
q = module.query()
_LOGGER.debug("Adding query for %s: %s", module, q)
req = merge(req, module.query())