MindrustUK / Heatmiser-for-home-assistant

Heatmiser Neo-Hub / Neostat support for home-assistant.io
88 stars 33 forks source link

Bug: 'NeoHub' object has no attribute 'get_devices_data'. #186

Closed stikonas closed 1 month ago

stikonas commented 1 month ago

I've just got this error after updating. Not yet sure whether the issue is on my side or on HA integration...

2024-10-21 01:01:55.837 ERROR (MainThread) [custom_components.heatmiserneo] Unexpected error fetching Heatmiser NeoHub : Neo-Hub data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/heatmiserneo/__init__.py", line 73, in async_update_data
    devices_data = await hub.get_devices_data()
                         ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NeoHub' object has no attribute 'get_devices_data'. Did you mean: 'get_device_list'?
stikonas commented 1 month ago

Possibly stale dependency, though when I removed deps folder I started getting

 File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/heatmiserneo/__init__.py", line 10, in <module>
    from neohubapi.neohub import NeoHub
ModuleNotFoundError: No module named 'neohubapi'

even though HA redownloaded deps/neohubapi

stikonas commented 1 month ago

Hmm, started working after I manually created deps/lib/python3.12/site-packages and added a symlinks to neohubapi and async_property. Strange but but probably not a bug here...