Thomas55555 / husqvarna_automower

Custom component for Home Assistant to monitor and control your Husqvarna Automower
https://github.com/Thomas55555/husqvarna_automower
MIT License
105 stars 28 forks source link

Integration fails to load #535

Closed liayn closed 1 year ago

liayn commented 1 year ago

Describe the bug

HASS version: Home Assistant 2023.6.3 Version https://github.com/Thomas55555/husqvarna_automower/releases/tag/2023.8.0

Error on loading the component

Logger: homeassistant.loader
Source: custom_components/husqvarna_automower/const.py:18
Integration: Husqvarna Automower (documentation, issues)
First occurred: 12:23:57 (1 occurrences)
Last logged: 12:23:57

Unexpected exception importing component custom_components.husqvarna_automower
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/husqvarna_automower/__init__.py", line 18, in <module>
    from .const import (
  File "/config/custom_components/husqvarna_automower/const.py", line 18, in <module>
    Platform.IMAGE,
    ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 783, in __getattr__
    raise AttributeError(name) from None
AttributeError: IMAGE
Logger: homeassistant.setup
Source: setup.py:215
First occurred: 12:23:57 (1 occurrences)
Last logged: 12:23:57

Setup failed for custom integration husqvarna_automower: Unable to import component: Exception importing custom_components.husqvarna_automower

Expected behavior No errors logged

Thomas55555 commented 1 year ago

Which HA version do you have?

liayn commented 1 year ago

See above:

HASS version: Home Assistant 2023.6.3

Currently updating to 2023.8 to try again

Thomas55555 commented 1 year ago

Ah okay. You need at least 2023.7.0

liayn commented 1 year ago

Please update https://github.com/Thomas55555/husqvarna_automower/blob/main/README.md?plain=1#L43 then. Maybe also mention the requirement with the release information too.

Thanks for the integration, btw. 🙏