TionAPI / HA-tion

Home assistant integration for Tion breezers
Apache License 2.0
72 stars 6 forks source link

Error setting up entry Tion Breezer Lite for tion #106

Closed Zuzumber closed 2 years ago

Zuzumber commented 2 years ago

Проблема После обновления HA до версии 2022.08 появилась ошибка "Error setting up entry Tion Breezer Lite for tion".

Общая информация: Версия HA: 2022.8.2 (установлена в докер) Версия компонента: 3.0.3 Модель бризера: Lite

Логи ошибки: Logger: homeassistant.config_entries Source: custom_components/tion/init.py:54 Integration: Tion breezer (documentation) First occurred: 18:48:10 (1 occurrences) Last logged: 18:48:10 Error setting up entry Tion Breezer Lite for tion Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/tion/init.py", line 29, in async_setup_entry hass.data[DOMAIN][config_entry.unique_id] = TionInstance(hass, config_entry) File "/config/custom_components/tion/init.py", line 54, in init _LOGGER.critical(f"Unique id is None for {self.config_entry.title}! " AttributeError: 'TionInstance' object has no attribute 'config_entry'

IATkachenko commented 2 years ago

Исправлено в v3.0.4

Интересно... по идее, новые версии компонента не должны вообще в эту часть кода попадать...

ps. Там у 2022.8 еще #102 есть. Возможно это -- следующее с чем вы столкнетесь...

Zuzumber commented 2 years ago

Спасибо, все работает! Но возникали новые ошибки!

Текст ошибки: Logger: custom_components.tion Source: custom_components/tion/init.py:29 Integration: Tion breezer (documentation) First occurred: 19:32:51 (2 occurrences) Last logged: 19:32:51

Unique id is None for Tion Breezer Lite! Will fix it by using F3:3D:1E:AA:79:A6 Done! Please restart Home Assistant.

IATkachenko commented 2 years ago

Это -- нормально. Если сделать как он просит (еще раз HA рестартнуть) -- все будет хорошо.

Zuzumber commented 2 years ago

Не всё так гладко, как хотелось бы!

Текст ошибки 1: Logger: homeassistant.core Source: custom_components/tion/init.py:132 Integration: Tion breezer (documentation) First occurred: 19:42:19 (1 occurrences) Last logged: 19:42:19

Error executing service: <ServiceCall fan.turn_on (c:01G9Z5BM1VQAJ3KR3W8KBC600A): entity_id=['fan.tion_f3_3d_1e_aa_79_a6_fan_speed']> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 1731, in catch_exceptions await coro_or_task File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call await result File "/config/custom_components/tion/fan.py", line 163, in async_turn_on await self.coordinator.set(fan_speed=target_speed, is_on=True) File "/config/custom_components/tion/init.py", line 132, in set await self.__tion.set(kwargs) File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 245, in set current_settings = await self.get(skip_update=True) File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 205, in get await self.get_state_from_breezer() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 187, in get_state_from_breezer response = await self._get_data_from_breezer() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 561, in _get_data_from_breezer raise TionException("_get_data_from_breezer", "Could not get breezer state") tion_btle.tion.TionException: ('_get_data_from_breezer', 'Could not get breezer state')

Текст ошибки 2: Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/tion/init.py:132 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 19:42:17 (1 occurrences) Last logged: 19:42:17

[2962652440] Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call await result File "/config/custom_components/tion/fan.py", line 163, in async_turn_on await self.coordinator.set(fan_speed=target_speed, is_on=True) File "/config/custom_components/tion/init.py", line 132, in set await self.__tion.set(kwargs) File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 245, in set current_settings = await self.get(skip_update=True) File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 205, in get await self.get_state_from_breezer() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 186, in get_state_from_breezer await self._try_write(request=self.command_getStatus) File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 44, in wrapper raise MaxTriesExceededError tion_btle.tion.MaxTriesExceededError

IATkachenko commented 2 years ago

Как я и говорил, дальше -- #102.