Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Не работает обновление данных в v3.1.3 в HA до 2024.2 #102

Closed
IATkachenko opened this issue Mar 2, 2024 · 4 comments · Fixed by #103
Closed
Labels
bug Something isn't working Home Assistant Home Assistant related issues need more info Further information is requested

Comments

@IATkachenko
Copy link
Owner

          Стоит 3.1.3 и все равно не работает автоапдайт

Originally posted by @shurakr in #99 (comment)

@IATkachenko
Copy link
Owner Author

@shurakr, debug лог пришлите, пожалуйста.

@IATkachenko IATkachenko added bug Something isn't working need more info Further information is requested Home Assistant Home Assistant related issues labels Mar 2, 2024
@IATkachenko IATkachenko changed the title Стоит 3.1.3 и все равно не работает автоапдайт Не работает обновление данных в v3.1.3 Mar 2, 2024
@YaroslavPolykov
Copy link

YaroslavPolykov commented Mar 4, 2024

@IATkachenko
Та же самая проблема.

Версия HA docker 2023.12.3

Мои логи:

2024-03-04 04:18:30.238 DEBUG (MainThread) [custom_components.yandex_weather.weather] state for restore: <state weather.yandex_weather=cloudy; temperature=-4.0, apparent_temperature=-4.0, temperature_unit=°C, humidity=94, pressure=135.03, pressure_unit=mmHg, wind_bearing=225, wind_speed=2.9, wind_speed_unit=m/s, visibility_unit=km, precipitation_unit=mm, forecast=[{'datetime': '2024-03-04T09:19:46.396796', 'wind_bearing': 225, 'precipitation_probability': 0, 'condition': 'cloudy', 'is_daytime': True, 'temperature': 0.0, 'templow': -1.0, 'pressure': 755.31, 'wind_speed': 5.8, 'precipitation': 0.0}, {'datetime': '2024-03-04T15:19:46.396796', 'wind_bearing': 225, 'precipitation_probability': 0, 'condition': 'clear-night', 'is_daytime': False, 'temperature': -3.0, 'templow': -4.0, 'pressure': 753.06, 'wind_speed': 5.0, 'precipitation': 0.0}], feels_like=-9, wind_gust=8.2, yandex_condition=Пасмурно, forecast_icons=['bkn_d', 'skc_n'], attribution=Data provided by Yandex Weather, entity_picture=https://yastatic.net/weather/i/icons/funky/dark/ovc.svg, friendly_name=Yandex Weather, supported_features=4 @ 2024-03-04T07:09:59.922981+03:00>
2024-03-04 04:18:30.239 DEBUG (MainThread) [custom_components.yandex_weather.weather] Time since last update: 0:08:30.316225 (2024-03-04 04:09:59.922981+00:00), update interval is 0:57:36
2024-03-04 04:18:30.239 DEBUG (MainThread) [custom_components.yandex_weather.updater] scheduling next refresh after offset=datetime.timedelta(seconds=2945, microseconds=683775)
2024-03-04 05:07:35.498 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback HomeAssistant.async_run_hass_job(<Job DataUpda...x7f6a970390>>>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 674, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 568, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args), name=hassjob.name)
                                 ^^^^^^^^^^^^^^^^^^^^^
TypeError: DataUpdateCoordinator._handle_refresh_interval() missing 1 required positional argument: '_now'

@YaroslavPolykov
Copy link

@IATkachenko Та же самая проблема.

Версия HA docker 2023.12.3

Мои логи:

2024-03-04 04:18:30.238 DEBUG (MainThread) [custom_components.yandex_weather.weather] state for restore: <state weather.yandex_weather=cloudy; temperature=-4.0, apparent_temperature=-4.0, temperature_unit=°C, humidity=94, pressure=135.03, pressure_unit=mmHg, wind_bearing=225, wind_speed=2.9, wind_speed_unit=m/s, visibility_unit=km, precipitation_unit=mm, forecast=[{'datetime': '2024-03-04T09:19:46.396796', 'wind_bearing': 225, 'precipitation_probability': 0, 'condition': 'cloudy', 'is_daytime': True, 'temperature': 0.0, 'templow': -1.0, 'pressure': 755.31, 'wind_speed': 5.8, 'precipitation': 0.0}, {'datetime': '2024-03-04T15:19:46.396796', 'wind_bearing': 225, 'precipitation_probability': 0, 'condition': 'clear-night', 'is_daytime': False, 'temperature': -3.0, 'templow': -4.0, 'pressure': 753.06, 'wind_speed': 5.0, 'precipitation': 0.0}], feels_like=-9, wind_gust=8.2, yandex_condition=Пасмурно, forecast_icons=['bkn_d', 'skc_n'], attribution=Data provided by Yandex Weather, entity_picture=https://yastatic.net/weather/i/icons/funky/dark/ovc.svg, friendly_name=Yandex Weather, supported_features=4 @ 2024-03-04T07:09:59.922981+03:00>
2024-03-04 04:18:30.239 DEBUG (MainThread) [custom_components.yandex_weather.weather] Time since last update: 0:08:30.316225 (2024-03-04 04:09:59.922981+00:00), update interval is 0:57:36
2024-03-04 04:18:30.239 DEBUG (MainThread) [custom_components.yandex_weather.updater] scheduling next refresh after offset=datetime.timedelta(seconds=2945, microseconds=683775)
2024-03-04 05:07:35.498 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback HomeAssistant.async_run_hass_job(<Job DataUpda...x7f6a970390>>>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 674, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 568, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args), name=hassjob.name)
                                 ^^^^^^^^^^^^^^^^^^^^^
TypeError: DataUpdateCoordinator._handle_refresh_interval() missing 1 required positional argument: '_now'

Протестировал версии 3.1.1 и 3.1.2. Проблем не наблюдаю, ошибки нету

@IATkachenko IATkachenko changed the title Не работает обновление данных в v3.1.3 Не работает обновление данных в v3.1.3 в HA до 2024.2 Mar 4, 2024
@IATkachenko
Copy link
Owner Author

IATkachenko commented Mar 4, 2024

Ухх, спасибо за логи!

HA в 2024.2 перешел на новый механизм планирования следующего запуска задачи -- home-assistant/core@8d3f693
Поскольку в интеграции используется умное планирование первого обновления нам тоже пришлось перейти на новый механизм.

Поэтому сейчас варианта два:

  • в HA 2023.1 и ниже -- оставаться на v3.1.2
  • в HA 2023.2 и выше -- переходить на v3.1.3 и выше.

Документацию и HACS сейчас поправлю.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Home Assistant Home Assistant related issues need more info Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants