alryaz / hass-lkcomu-interrao

Интеграция Home Assistant с ЛК "Интер РАО"
Other
42 stars 6 forks source link

This will stop working in Home Assistant 2025.1 #37

Open alex-v-fraser opened 2 months ago

alex-v-fraser commented 2 months ago

Регистратор: homeassistant.helpers.frame Источник: helpers/frame.py:151 Первое сообщение: 19:17:05 (2 сообщений) Последнее сообщение: 19:17:06

Detected code that calls async_forward_entry_setup for integration lkcomu_interrao with title: my.mosenergosbyt.ru (**@mail.ru) and entry_id: c5e37740**f67b2af61c, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

alex-v-fraser commented 2 months ago

в файле init.py вместо

    for domain in (SENSOR_DOMAIN, BINARY_SENSOR_DOMAIN):
        hass.async_create_task(
            hass.config_entries.async_forward_entry_setup(
                config_entry,
                domain,
            )
        )

вставить

    await hass.config_entries.async_forward_entry_setups(
        config_entry,
        [SENSOR_DOMAIN, BINARY_SENSOR_DOMAIN],
    )