libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
208 stars 23 forks source link

'dyson_local.climate': Platform not found. #160

Closed maxime-c16 closed 1 month ago

maxime-c16 commented 1 month ago

I cannot use the climate control from hass dashboard nor Apple home app. When trying to control the temperature from hass dashboard, I get this error message : This entity is no longer being provided by the dyson_local integration. If the entity is no longer in use, delete it in settings. . And this one as well, Unable to prepare setup for platform 'dyson_local.climate': Platform not found.

here is the log file if you need it:

`Logger: homeassistant.setup Source: setup.py:403 First occurred: 14 May 2024 at 10:56:39 (2 occurrences) Last logged: 14 May 2024 at 10:56:39

Unable to prepare setup for platform 'dyson_local.climate': Platform not found (Exception importing custom_components.dyson_local.climate).`

and this log file :


Source: loader.py:834 
First occurred: 14 May 2024 at 10:56:39 (2 occurrences) 
Last logged: 14 May 2024 at 10:56:39

Unexpected exception importing platform custom_components.dyson_local.climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 834, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 851, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/dyson_local/climate.py", line 29, in <module>
    SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_ON | ClimateEntityFeature.TURN_OFF
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 784, in __getattr__
    raise AttributeError(name) from None
AttributeError: TURN_ON```
ash12swanson commented 1 month ago

You probably need to update the version of Home Assistant you're on, as those two ClimateEntityFeature flags were added in 2024.2. I was having this same issue on 2024.1.5 but I just updated to 2024.5.4 and it's working again 🎉 (after deleting and re-adding my devices)

dotvezz commented 1 month ago

@maxime-c16 Hey, I'm closing this as @ash12swanson's comment should resolve your issue. But feel free to follow up if you need any more help!