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

Error on helpers/update_coordinator.py:318 #4

Open
fernandolcardoso opened this issue Dec 5, 2024 · 1 comment
Open

Error on helpers/update_coordinator.py:318 #4

fernandolcardoso opened this issue Dec 5, 2024 · 1 comment

Comments

@fernandolcardoso
Copy link

fernandolcardoso commented Dec 5, 2024

Hello IMOU, thank you for developing and sharing a library compatible with Home Assistant.

I am running Home Assistant 2024.12.0

I followed the steps provided in the documentation and when accessing all three host options, I am having difficulty accessing and/or integrating.

Among the url/host options, shouldn't there be a 'us' option listed?

image

Below, share all the errors returned by Home Assistant

Este erro originou-se de uma integração personalizada.

Registrador: custom_components.imou.coordinator
Fonte: helpers/update_coordinator.py:318
integração: imou
Ocorreu pela primeira vez: 09:32:04 (8 ocorrências)
Último registro: 09:33:48

Unexpected error fetching ImouDataUpdateCoordinator data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in __wrap_async_setup
    await self._async_setup()
  File "/config/custom_components/imou/coordinator.py", line 46, in _async_setup
    devices_list = await self._device_manager.async_get_devices()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/imou/device.py", line 217, in async_get_devices
    if device.channel_number > 0 and len(device.channels) > 0:
       ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'coroutine' object has no attribute 'channel_number'
Registrador: py.warnings
Fonte: components/wled/coordinator.py:113
Ocorreu pela primeira vez: 09:33:33 (1 ocorrências)
Último registro: 09:33:33

/usr/local/lib/python3.13/asyncio/timeouts.py:85: RuntimeWarning: coroutine 'ImouDeviceManager.async_get_devices' was never awaited async def __aenter__(self) -> "Timeout":
Registrador: py.warnings
Fonte: components/recorder/core.py:691
Ocorreu pela primeira vez: 09:32:32 (1 ocorrências)
Último registro: 09:32:32

/usr/local/lib/python3.13/site-packages/sqlalchemy/orm/relationships.py:1493: RuntimeWarning: coroutine 'ImouDeviceManager.async_get_devices' was never awaited def cascade_iterator(
2024-12-05 09:37:41.265 ERROR (MainThread) [custom_components.imou.coordinator] Unexpected error fetching ImouDataUpdateCoordinator data
  File "/config/custom_components/imou/coordinator.py", line 46, in _async_setup
  File "/config/custom_components/imou/device.py", line 217, in async_get_devices
@Imou-OpenPlatform
Copy link
Owner

Regarding the API address, you can determine the region where your account is located based on the domain field returned by the accessToken interface. Additionally, there is no need to worry about entering the wrong address, as we will correct it to the correct region.
Regarding this error issue, could you please provide the device serial number so that we can investigate the cause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants