Skip to content

Commit

Permalink
Fix hardcoded lumi.gateway module path
Browse files Browse the repository at this point in the history
This hardcoded 'path' broke when the gateway was moved from the main package to its own one under integrations/lumi/gateway.
  • Loading branch information
rytilahti committed Jul 14, 2023
1 parent d6c2075 commit 1c912eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion miio/integrations/lumi/gateway/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ def setup_device(self, dev_info, model_info):
return

# Obtain the correct subdevice class
# TODO: is there a better way to obtain this information?
subdevice_cls = getattr(
sys.modules["miio.gateway.devices"], model_info.get("class")
sys.modules["miio.integrations.lumi.gateway.devices"],
model_info.get("class"),
)
if subdevice_cls is None:
subdevice_cls = SubDevice
Expand Down

0 comments on commit 1c912eb

Please sign in to comment.