aendle / custom_components

missing feature test reposetory
66 stars 33 forks source link

Error loading component on 0.84.3 #4

Closed SergiSuarez closed 5 years ago

SergiSuarez commented 5 years ago

Following message appears after update hass.io in docker environment under ubuntu to 0.84.3

2018-12-18 09:42:51 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.smart_thermostat. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 92, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/climate/smart_thermostat.py", line 28, in <module>
    from homeassistant.helpers.restore_state import async_get_last_state
ImportError: cannot import name 'async_get_last_state'
2018-12-18 09:42:51 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.smart_thermostat

Downgrade to 0.83.3 fixes the issue

flopon commented 5 years ago

Same problem here, just made a PR to adress this issue.