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

Unexpected Error #17

Closed
tempus2016 opened this issue Apr 11, 2023 · 2 comments
Closed

Unexpected Error #17

tempus2016 opened this issue Apr 11, 2023 · 2 comments

Comments

@tempus2016
Copy link

Spoke too soon 😂

This error originated from a custom integration.

Logger: custom_components.hon.hon
Source: custom_components/hon/hon.py:52 
Integration: Haier hOn (documentation, issues) 
First occurred: 03:50:02 (1354 occurrences) 
Last logged: 09:28:15

Unexpected error fetching a8-48-fa-18-ef-e4 data: object _AsyncGeneratorContextManager can't be used in 'await' expression
Unexpected error fetching 78-e3-6d-8d-cc-68 data: object _AsyncGeneratorContextManager can't be used in 'await' expression
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/hon/hon.py", line 52, in _async_update_data
    await self._device.update()
  File "/usr/local/lib/python3.10/site-packages/pyhon/appliance.py", line 162, in update
    await self.load_attributes()
  File "/usr/local/lib/python3.10/site-packages/pyhon/appliance.py", line 154, in load_attributes
    self._attributes = await self._api.load_attributes(self)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/api.py", line 85, in load_attributes
    async with self._hon.get(url, params=params) as response:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler.py", line 34, in get
    async with self._intercept(self._session.get, *args, **kwargs) as response:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler.py", line 86, in _intercept
    yield await self._intercept(method, *args, loop=loop + 1, **kwargs)
TypeError: object _AsyncGeneratorContextManager can't be used in 'await' expression

@Andre0512
Copy link
Owner

sh*t, this error comes from the new session refresh method for Andre0512/pyhOn#10.
All v0.5.0-beta.x versions should be affected every 8 hours, I will fix this soon.
As workaround you can reload the integration under "devices & services".

@Andre0512
Copy link
Owner

Hey, should be fixed in new release v0.5.0 🙂

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