LG Smartthinq Air Conditioning

I have a similar issue as @Conductor, I tried the changes from @trentjw (thanks) however still have the following errors on entity creation.

Logger: homeassistant.components.climate
Source: custom_components/thinq_v2/climate.py:226
Integration: Climate (documentation, issues)
First occurred: 9:09:42 PM (1 occurrences)
Last logged: 9:09:42 PM

Error adding entities for domain climate with platform thinq_v2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 429, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 190, in capability_attributes
    ATTR_HVAC_MODES: self.hvac_modes,
  File "/config/custom_components/thinq_v2/climate.py", line 222, in hvac_modes
    return [
  File "/config/custom_components/thinq_v2/climate.py", line 226, in <listcomp>
    in self._ac.model.value("airState.opMode").options.values()
  File "/usr/local/lib/python3.8/site-packages/wideq/client.py", line 347, in value
    d = self.data["Value"][name]
KeyError: 'airState.opMode'
1 Like

Conductor stated he was going to remove and reinstall the integration to see if he had a corrupted file from the mods and try again, have not heard back so probably it took care of the issue so no reason to revisit this thread

also the mods that I found only apply to getting feedback from the units, before mods the units showed in homeassistant and could be controlled like turned on and off and switch modes but no temperature feed back or mode status, so if you are not seeing the units then something with your credentials to log into the LG account would be suspect

Finally had a chance to reinstall. The component was recently updated and appears to include the changes you mentioned except for the line 243 change in climate.py so I updated that line. Below are the errors Iā€™m currently seeing. Anything else I can try or these errors expected at this point? The controls seem to be working properly via the thermostat card and not seeing any errors there like I was before. Thanks

Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:133
Integration: Climate (documentation, issues)
First occurred: 11:26:24 AM (1 occurrences)
Last logged: 11:26:24 AM

The thinq_v2 platform for the climate integration does not support platform setup. Please remove it from your config.
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:133
Integration: Sensor (documentation, issues)
First occurred: 11:26:24 AM (1 occurrences)
Last logged: 11:26:24 AM

The thinq_v2 platform for the sensor integration does not support platform setup. Please remove it from your config.

yeah that is the same errors I get that I just ignore

1 Like

Thanks @trentjw. Yes it does appear to be a different issue.

During the initial configuration of the Integration when I login with the URL provided I then receive a URL redirection, the page loads however the page is blank. Could this be the issue? Or is this the expected behavior?

The page was always blank for me too. I copied the URL from the blank page and that worked for me. If you havenā€™t already I would uninstall and reinstall the component. That fixed things for me. The component was updated recently but I still needed to do the line 243 change in climate.py for things to work properly.

returns blank page the complete URL in the browser for the blank page needs to be copied back to the integration

Thanks for confirming. Iā€™ve created an issue including the error logs. Entities not created during initial configuration Ā· Issue #19 Ā· marciogranzotto/hass-smartthinq Ā· GitHub

they look fine to me, you should be able to build a climate card for each one

Sorry Iā€™m confused, I thought to create a climate card I needed an entity? I donā€™t have any entities, only devices. Apologies, Iā€™m pretty new to HA. Are these instructions somewhere I havenā€™t found yet? Thanks!

you build the entity from the device

Maybe do a restart of your home assistant to make sure it grabs everything

go into your developer tool and search for anything that says climate if they are there then you can build a thermostat card

Iā€™ve no climate entities unfortunately. Iā€™ve performed numerous restarts and have removed\added the integration multiple times. The below error is logged on the subject.

2021-05-02 12:26:14 ERROR (MainThread) [homeassistant.components.climate] Error adding entities for domain climate with platform thinq_v2

do you have anything in your config file that has wide Q or anything to do with LG

also how do you log into your LG account on your smart phone? do you use another account like Google or facebook or email login?

Negative, nothing in my config for LG or ThinQ. I login to my LG account using my e-mail address (not a social account).

Have you tried cycling the ac unit with your phone app to see if home assistant picks up anything?

Unfortunately, yes I have. Also tried making sure it was on while restarting HA.

Man I got nothing left, I will keep you in mind if I stumble across anything, there was a topic where entities were not being built and multiple home assistant restarts finally resolved it

Thanks @trentjw, appreciate the help.

Looks like multiple people have the same issue, Cannot control v2 device Ā· Issue #9 Ā· marciogranzotto/hass-smartthinq Ā· GitHub

1 Like