home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.34k stars 30.64k forks source link

LG ThinQ integration cannot be added and errors are made. #129564

Open shyoo0000 opened 3 days ago

shyoo0000 commented 3 days ago

The problem

I was trying to link LG ThinQ integration. The PAT token was issued normally, but I tried to link it to HA, but suddenly the setting failure appeared, and no device appeared. Looking at the log, I think it's because it's a water purifier.

`로거: homeassistant.config_entries
소스: /usr/src/homeassistant/homeassistant/config_entries.py:719
처음 발생: 오후 6:30:01 (1 발생)
마지막 로그인: 오후 6:30:01

Error setting up entry LG ThinQ for lg_thinq
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 71, in async_setup_entry
    await async_setup_coordinators(hass, entry, thinq_api)
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 93, in async_setup_coordinators
    bridge_list = await async_get_ha_bridge_list(thinq_api)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 739, in async_get_ha_bridge_list
    task_result = await asyncio.gather(*task_list)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 785, in _async_create_ha_bridges
    else constructor(
         ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/water_purifier.py", line 46, in __init__
    profiles=WaterPurifierProfile(profile=profile),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/water_purifier.py", line 16, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 47, in __init__
    self.generate_properties(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 235, in generate_properties
    resource_property = property.get(resource)
                        ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'`

What version of Home Assistant Core has the issue?

core-2024.11.0b0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

LG ThinQ

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/lg_thinq

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 days ago

Hey there @lg-thinq-integration, mind taking a look at this issue as it has been labeled with an integration (lg_thinq) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `lg_thinq` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign lg_thinq` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


lg_thinq documentation lg_thinq source (message by IssueLinks)

JangwonLeeLG commented 2 days ago

@shyoo0000 Thank you for your report. Could you give us more information? The information would be very helpful for us to make the 'LG ThinQ integration' better. Please let us know the following two things 1) Whether it happens after removing your water purifier from ThinQ cloud 2) The water purifier model name or number.

shyoo0000 commented 2 days ago

After deleting the water purifier, it connects well right away. The model names are WD305AS and WD302AP.

joostlek commented 2 days ago

Please keep your comments in English as we use English as our main language of communication

JangwonLeeLG commented 2 days ago

Thank you for the information. Let us do our best to fix the issue.

boojew commented 2 days ago

I have similar issues w/ my cooktop. CBIS3618B.BBKLSTA

Logger: homeassistant.config_entries
Source: config_entries.py:635
First occurred: 9:29:18 AM (1 occurrences)
Last logged: 9:29:18 AM

Error setting up entry LG ThinQ for lg_thinq
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 71, in async_setup_entry
    await async_setup_coordinators(hass, entry, thinq_api)
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 93, in async_setup_coordinators
    bridge_list = await async_get_ha_bridge_list(thinq_api)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 739, in async_get_ha_bridge_list
    task_result = await asyncio.gather(*task_list)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 785, in _async_create_ha_bridges
    else constructor(
         ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/cooktop.py", line 156, in __init__
    profiles=CooktopProfile(profile=profile),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/cooktop.py", line 52, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 47, in __init__
    self.generate_properties(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 235, in generate_properties
    resource_property = property.get(resource)
                        ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
kwon2288 commented 1 day ago

I have similar issues with cooktop too. model is BEI3G.

로거: homeassistant.config_entries
소스: config_entries.py:635
처음 발생: 오후 12:14:19 (2 발생)
마지막 로그인: 오후 12:14:36

Error setting up entry LG ThinQ for lg_thinq
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 71, in async_setup_entry
    await async_setup_coordinators(hass, entry, thinq_api)
  File "/usr/src/homeassistant/homeassistant/components/lg_thinq/__init__.py", line 93, in async_setup_coordinators
    bridge_list = await async_get_ha_bridge_list(thinq_api)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 739, in async_get_ha_bridge_list
    task_result = await asyncio.gather(*task_list)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/integration/homeassistant/api.py", line 785, in _async_create_ha_bridges
    else constructor(
         ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/cooktop.py", line 156, in __init__
    profiles=CooktopProfile(profile=profile),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/cooktop.py", line 52, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 47, in __init__
    self.generate_properties(
  File "/usr/local/lib/python3.12/site-packages/thinqconnect/devices/connect_device.py", line 235, in generate_properties
    resource_property = property.get(resource)
                        ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
balloob commented 1 hour ago

@JangwonLeeLG pass return_exceptions=True to the asyncio.gather. And then filter out all devices that had an exception (log them so user knows). That way the integration will always start up.

LG-ThinQ-Integration commented 47 minutes ago

@JangwonLeeLG pass return_exceptions=True to the asyncio.gather. And then filter out all devices that had an exception (log them so user knows). That way the integration will always start up.

Thank you for the guidance. We will do as your suggestion as soon as possible. :)