IATkachenko / HA-YandexWeather

Yandex weather intergration for Home Assistant
Apache License 2.0
197 stars 10 forks source link

Перестала работать после обновления на core_2024.3.3 #110

Closed b2rdetor closed 2 months ago

b2rdetor commented 3 months ago

В чем проблема?

Доброго дня. Перестал работать после обновления на core_2024.3.3

Invalid config The following integrations and platforms could not be set up:

yandex_weather (Show logs) Please check your config and logs.

При использовании какой версии интеграции возникает проблема?

3.1.3

Какая версия Home Assistant используется?

core_2024.3.3

Какой способ установки Home Assistant используется?

Home Assistant Supervised

Самопроверка по созданию ключа

Есть что-нибудь полезное в логе?

Регистратор: homeassistant.setup
Источник: setup.py:316
Первое сообщение: 10:19:31 (1 сообщений)
Последнее сообщение: 10:19:31

Setup failed for custom integration 'yandex_weather': Unable to import component: cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/__init__.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 979, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/yandex_weather/__init__.py", line 11, in <module>
    from .config_flow import get_value
  File "/config/custom_components/yandex_weather/config_flow.py", line 22, in <module>
    from .updater import WeatherUpdater
  File "/config/custom_components/yandex_weather/updater.py", line 13, in <module>
    from homeassistant.components.weather import (
ImportError: cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 316, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 997, in async_get_component
    self._component_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 989, in async_get_component
    comp = self._get_component()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/yandex_weather/__init__.py", line 11, in <module>
    from .config_flow import get_value
  File "/config/custom_components/yandex_weather/config_flow.py", line 22, in <module>
    from .updater import WeatherUpdater
  File "/config/custom_components/yandex_weather/updater.py", line 13, in <module>
    from homeassistant.components.weather import (
ImportError: cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/__init__.py)

Дополнительная информация

No response

Dimonix77 commented 3 months ago

Эта ошибка появилась после обновления ядра до версии 2024.4.0 ( Core 2024.4.0 Supervisor 2024.03.1 ).

IATkachenko commented 2 months ago

Эта ошибка появилась после обновления ядра до версии 2024.4.0 ( Core 2024.4.0 Supervisor 2024.03.1 ).

@Dimonix77, про 2024.4 есть #109, не надо все в одну кучу валить, потом разбираться очень сложно.

@b2rdetor у вас точно 2024.3.3? ATTR_FORECAST HA выпилил именно в 2024.4 (и именно на это жалуется лог). Проверьте еще раз версии, пожалуйста.

b2rdetor commented 2 months ago

на последней версии проблем нет - все заработало.