docbobo / home-assistant-miele

Home Assistant support for Miele@home connected appliances
37 stars 16 forks source link

Fix get_platform import error #9

Closed n3pf closed 5 years ago

n3pf commented 5 years ago

This patch fixes this import error on load:

Traceback (most recent call last): File "/lib/python3.7/site-packages/homeassistant/loader.py", line 263, in _load_file module = importlib.import_module(path) File "/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/custom_components/miele/init.py", line 13, in from homeassistant.loader.Integration import get_platform

Based on: https://github.com/home-assistant/home-assistant/issues/23009

ReneNulschDE commented 5 years ago

Thank you n3pf. Much better than my patch. Works in 0.93.0.dev0 and 0.91.4.

docbobo commented 5 years ago

:shipit: