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 setting up entry to email@xxx.com for hon #3

Closed
slegars56 opened this issue Mar 11, 2023 · 3 comments
Closed

Error setting up entry to email@xxx.com for hon #3

slegars56 opened this issue Mar 11, 2023 · 3 comments

Comments

@slegars56
Copy link

Hi,

When testing your integration I get the following error at the first connection:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hon/init.py", line 32, in async_setup_entry
await hon.setup()
File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 57, in setup
device = HonDevice(self, appliance)
File "/usr/local/lib/python3.10/site-packages/pyhon/device.py", line 8, in init
appliance["attributes"] = {v["parName"]: v["parValue"] for v in appliance["attributes"]}
KeyError: 'attributes'

Tested on 0.2.1

@Andre0512
Copy link
Owner

Hi, thanks for reporting.
Should be fixed in v0.2.2 🙂

@slegars56
Copy link
Author

Hi,

Thank you for the quick action. I now getting the error below. I see it's related to pyHon, I can create a dedicated Issue on the right repo if you want.

I guess it's related to the Virtual Wine Cellar Appliance (see json at the bottom):

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hon/init.py", line 32, in async_setup_entry
await hon.setup()
File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 58, in setup
await asyncio.gather(*[
File "/usr/local/lib/python3.10/site-packages/pyhon/device.py", line 135, in load_attributes
self._attributes = await self._connector.load_attributes(self)
File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 102, in load_attributes
async with self._session.get(url, params=params, headers=await self._headers) as response:
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 508, in _request
req = self._request_class(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 283, in init
url2 = url.with_query(params)
File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 977, in with_query
new_query = self._get_str_query(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 938, in _get_str_query
query = "&".join(self._query_seq_pairs(quoter, query.items()))
File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 901, in _query_seq_pairs
yield quoter(key) + "=" + quoter(cls._query_var(val))
File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 916, in _query_var
raise TypeError(
TypeError: Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>

json returned by the Wine Cellar Appliance:
{
'completeMyTasteProfile': 0,
'enrollmentDate': '2022-XX-XXT21: 08: 53.150Z',
'applianceTypeId': 6,
'brand': 'hOn',
'zone': '1',
'series': 'virtualWineCellar',
'applianceCapacity': '41',
'firstEnrollmentTBC': False,
'code': '34004778',
'applianceStatus': 1,
'SK': 'app#xxxxxxxxxxx'',
'PK': 'user#eu-west-1:xxxxxxxxxxxxxxxxxxxxx',
'applianceId': '34004778xxxxxxxx'#2022-08-09T21: 08: 53.150Z',
'id': 403, 'modelName': 'VWC 20',
'applianceTypeName': 'WC',
'connectivity': 'none',
'serialNumber': 'xxxxxxxxxxx',
'sections': {'chatbot': True, 'double_pairing_hidden': False, 'epp_enabled': False},
'topics': {'publish': [], 'subscribe': ['$aws/events/presence/disconnected/34004778xxxxxxxx', '$aws/events/presence/connected/34004778xxxxxxxx', 'haier/things/34004778xxxxxxxx/event/appliancestatus/update', 'haier/things/34004778xxxxxxxx/event/discovery/update'
]}
}

@Andre0512 Andre0512 transferred this issue from Andre0512/hon Mar 13, 2023
Andre0512 added a commit that referenced this issue Mar 13, 2023
@Andre0512
Copy link
Owner

Hi, I moved your issue to the right repo. The wine color was a good hint, when added it I had the same issue. I think we can ignore virtual appliances for now. I fixed it and created a new release.

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