sauresha icon indicating copy to clipboard operation
sauresha copied to clipboard

Предупреждение в логе HA после обновления на 2023.2

Open avbor opened this issue 2 years ago • 13 comments

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for sauresha using this method at custom_components/sauresha/__init__.py, line 96: hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)

avbor avatar Feb 02 '23 07:02 avbor

Logger: homeassistant.helpers.frame Source: helpers/frame.py:77 First occurred: 21:24:44 (1 occurrences) Last logged: 21:24:44

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for sauresha using this method at custom_components/sauresha/init.py, line 96: hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)

lardeg avatar Apr 06 '23 16:04 lardeg

В Home Assistant 2023.5.1 SauresHA уже не работает, в логах выдает такую ошибку

Home Assistant 2023.5.1 Supervisor 2023.04.1

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/sauresha/__init__.py", line 96, in async_setup_entry
    hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Кажется есть решение проблемы

https://community.home-assistant.io/t/issues-with-nest-protect-after-installing-20230503-1/567537/5?u=divanx10 https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards/ https://community.home-assistant.io/t/async-forward-entry-setups-vs-async-setup-platforms/457824

The async_setup_platforms function had been marked deprecated a while back, initially set to fail as obsolete in 2023.3. Now it actually fails in 2023.5, as previously announced. Since all the messages in this thread are about custom integrations (likely from HACS) the developer of those custom integrations will need to update their integration to use to use await async_forward_entry_setups instead of async_setup_platforms.

DivanX10 avatar May 05 '23 12:05 DivanX10

Я переделал все нужное на REST сенсоры, с учетом того, что нужно мне только показания счетчиков да батарейка контроллера - меня устраивает.

avbor avatar May 05 '23 13:05 avbor

В Home Assistant 2023.5.1 SauresHA уже не работает, в логах выдает такую ошибку

Home Assistant 2023.5.1 Supervisor 2023.04.1

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/sauresha/__init__.py", line 96, in async_setup_entry
    hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Кажется есть решение проблемы

https://community.home-assistant.io/t/issues-with-nest-protect-after-installing-20230503-1/567537/5?u=divanx10 https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards/ https://community.home-assistant.io/t/async-forward-entry-setups-vs-async-setup-platforms/457824

The async_setup_platforms function had been marked deprecated a while back, initially set to fail as obsolete in 2023.3. Now it actually fails in 2023.5, as previously announced. Since all the messages in this thread are about custom integrations (likely from HACS) the developer of those custom integrations will need to update their integration to use to use await async_forward_entry_setups instead of async_setup_platforms.

Что в итоге надо сделать?

lardeg avatar May 05 '23 14:05 lardeg

Я переделал все нужное на REST сенсоры, с учетом того, что нужно мне только показания счетчиков да батарейка контроллера - меня устраивает.

Можешь поделиться? Как это сделать и куда это нужно вставлять?

DivanX10 avatar May 05 '23 14:05 DivanX10

Можешь поделиться? Как это сделать и куда это нужно вставлять?

https://github.com/avbor/HomeAssistantConfig/blob/master/packages/pack_water_meters.yaml

avbor avatar May 05 '23 14:05 avbor

Можешь поделиться? Как это сделать и куда это нужно вставлять?

https://github.com/avbor/HomeAssistantConfig/blob/master/packages/pack_water_meters.yaml

Спасибо! Что в этом файле надо поменять? Чтоб получить свои показания счётчиков.

lardeg avatar May 05 '23 14:05 lardeg

Спасибо! Что в этом файле надо поменять? Чтоб получить свои показания счётчиков.

!secret saures_login_payload заменить на свой логин и пароль в формате "[email protected]&password=password"

{% if meter.sn == '13193152' %} {% if meter.sn == '09-104476' %} здесь заменить серийные номера счетчиков на свои

...вроде все

avbor avatar May 05 '23 14:05 avbor

Спасибо! Что в этом файле надо поменять? Чтоб получить свои показания счётчиков.

!secret saures_login_payload заменить на свой логин и пароль в формате "[email protected]&password=password"

{% if meter.sn == '13193152' %} {% if meter.sn == '09-104476' %} здесь заменить серийные номера счетчиков на свои

...вроде все

Package saures setup failed. Component water_meters_pack Integration 'water_meters_pack' not found.

Где взять интеграцию water_meters_pack?

DivanX10 avatar May 05 '23 15:05 DivanX10

Это не интеграция, это package - https://www.home-assistant.io/docs/configuration/packages/

PS Можно просто скопировать сенсоры и автоматизацию куда удобно...

avbor avatar May 05 '23 16:05 avbor

А, еще !secret saures_flat_id - id объекта (квартиры) в сауресе...

avbor avatar May 05 '23 20:05 avbor

А, еще !secret saures_flat_id - id объекта (квартиры) в сауресе...

Invalid config for [template]: Entity sensor.saures_water_meter_22-36028_hot is neither a valid entity ID nor a valid UUID for dictionary value @ data['entity_id']. Got None. (See ?, line ?). Invalid config for [template]: Entity sensor.saures_water_meter_22-446629_cold is neither a valid entity ID nor a valid UUID for dictionary value @ data['entity_id']. Got None. (See ?, line ?). image

lardeg avatar May 30 '23 07:05 lardeg

@avbor Есть возможность blueprint сделать?

lardeg avatar May 30 '23 07:05 lardeg