cdpuk / ha-bestway

Home Assistant integration for Bestway / Lay-Z-Spa hot tubs
MIT License
74 stars 18 forks source link

Climate fails to import v1.5.0 #54

Closed TheOneOgre closed 8 months ago

TheOneOgre commented 8 months ago

Bestway device

SaluSpa

Describe the bug

Upon updating to the latest 1.5.0 integration version, I am getting errors while importing climate related things. Everything else appears normal but the thermostat/climate is greyed out and does not work even after resetting up the integration. Reverting to 1.4.0 fixes the issue.

HA Core 2024.1.5

Logs


Logger: homeassistant.loader
Source: loader.py:842
First occurred: 07:01:47 (1 occurrences)
Last logged: 07:01:47

Unexpected exception importing platform custom_components.bestway.climate
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/loader.py", line 842, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/loader.py", line 859, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/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/bestway/climate.py", line 25, in <module>
    | ClimateEntityFeature.TURN_OFF
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/enum.py", line 784, in __getattr__
    raise AttributeError(name) from None
AttributeError: TURN_OFF
TheOneOgre commented 8 months ago

Just realized my docker container stopped updating and was not using the latest version of HA, disregard