hass-smartthinq: smartthinq: Error on device update! (self._ac.get_power())
Seems like latest update broke integration with my AC. I’m getting the following in the logs:
Traceback (most recent call last):
File "/config/custom_components/smartthinq/climate.py", line 252, in check_power
power = self._ac.get_power()
File "/usr/local/lib/python3.7/site-packages/wideq/ac.py", line 299, in get_power
value = self._get_config('InOutInstantPower')
File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 433, in _get_config
key,
File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 492, in get_device_config
'data': '',
File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 394, in post
return lgedm_post(url, data, self.auth.access_token, self.session_id)
File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 213, in lgedm_post
raise APIError(code, message)
wideq.core.APIError: ('0111', '제품 응답 지연')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 319, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
self.update # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/smartthinq/climate.py", line 283, in update
self.check_power()
File "/config/custom_components/smartthinq/climate.py", line 256, in check_power
except wideq.InvalidRequestError:
NameError: name 'wideq' is not defined
Looks like import wideq
is missing in that method.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 27 (3 by maintainers)
Commits related to this issue
- Add missing `import wideq` for #70 — committed to sampsyo/hass-smartthinq by sampsyo 4 years ago
- Require wideq 1.4.0 (#70) — committed to sampsyo/hass-smartthinq by sampsyo 4 years ago
- Add check for missing state (#70) This bug was introduced in 406d48d6dee7453a6a42801eb9dbf09a3d8b070c (#21). — committed to sampsyo/hass-smartthinq by sampsyo 4 years ago
As a temporary workaround you may try this. Open climate.py and find the function called
check_power
(aprox. line 244). After the following lines:Add this:
Save the file and reboot HA. Mind the intendation! Use spaces only, not tabs. This edit will mute all APIErrors in that function. But I guess things should be fixed somewhere in wideq. Also, I’m not sure what this 0111 “Product response delay” error actually means. My AC should report power consumption afair.
I am from Butovo too) The reason of the problem is terrible ping to LG servers. Do this (https://github.com/sampsyo/hass-smartthinq/issues/70#issuecomment-660617040) to solve the problem. It helps me)
@mihail4anov, thanks, this was missing a check. (A bug introduced in #21.)