Description
Hi there,
Ive been a long time user of your integration. Its served me really well to monitor consumption and solar generation - so thanks!!
However I recently updated homeassistant to 2025.2.1 and as a result the sunspec sensor are no longer showing any data. They are all listed as unavailable. My inverter is from SolarEdge.
-->
Version of the custom_component
I tried both v 0.25 and 0.26.
-->
Describe the bug
Data not being pulled through to HA.
Debug log
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/sunspec/sensor.py:4
integration: SunSpec (documentation, issues)
First occurred: 12:31:03 (4 occurrences)
Last logged: 12:34:11
Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2342, in async_forward_entry_setup
return await self._async_forward_entry_setup(entry, domain, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2374, in _async_forward_entry_setup
await integration.async_get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1108, in async_get_platform
platforms = await self.async_get_platforms((platform_name,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
import_future.result()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1173, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1098, in _load_platforms
platform_name: self._load_platform(platform_name)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1272, in _load_platform
cache[full_name] = self._import_platform(platform_name)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1304, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/sunspec/sensor.py", line 4, in
from homeassistant.components.sensor import DEVICE_CLASS_CURRENT
ImportError: cannot import name 'DEVICE_CLASS_CURRENT' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/init.py)