jonasbkarlsson / ev_smart_charging

Electric vehicle smart charging for Home Assistant.
MIT License
139 stars 18 forks source link

2024.1.0b0 reports error #235

Closed mhoogenbosch closed 6 months ago

mhoogenbosch commented 6 months ago

Latest version v1.9.0 gives an error when starting up 2024.1.0b0

Logger: homeassistant.setup
Source: setup.py:251
First occurred: 10:45:50 (1 occurrences)
Last logged: 10:45:50

Setup failed for custom integration 'ev_smart_charging': Unable to import component: Exception importing custom_components.ev_smart_charging
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 822, 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/ev_smart_charging/__init__.py", line 17, in <module>
    from .coordinator import EVSmartChargingCoordinator
  File "/config/custom_components/ev_smart_charging/coordinator.py", line 63, in <module>
    from .sensor import (
  File "/config/custom_components/ev_smart_charging/sensor.py", line 32, in <module>
    class EVSmartChargingSensor(EVSmartChargingEntity, SensorEntity):
  File "/config/custom_components/ev_smart_charging/sensor.py", line 41, in EVSmartChargingSensor
    @SensorEntity.native_value.setter
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'cached_property' object has no attribute 'setter'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 830, in get_component
    raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.ev_smart_charging
jonasbkarlsson commented 6 months ago

Thanks! I have created an issue for Core: https://github.com/home-assistant/core/issues/106545

jonasbkarlsson commented 6 months ago

The issue will not be solved by Core. Instead, there is now a release v1.10.0 that solves this.

mhoogenbosch commented 6 months ago

New version solves. Thanks for your extremely fast response.