core: Invalid Type for Auth Parameters
The problem
2023.2.5
What version of Home Assistant Core has the issue?
2023.2.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Hive
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hive
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 88, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 503, in startSession
await self.getDevices("No_ID")
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 426, in getDevices
await self.hiveRefreshTokens()
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 304, in hiveRefreshTokens
result = await self.auth.refresh_token(
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/api/hive_auth_async.py", line 548, in refresh_token
result = await self.loop.run_in_executor(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 391, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 691, in _make_api_call
request_dict = self._convert_to_request_dict(
File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 739, in _convert_to_request_dict
request_dict = self._serializer.serialize_to_request(
File "/usr/local/lib/python3.10/site-packages/botocore/validate.py", line 360, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter AuthParameters,
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18
This looks like a problem with apyhiveapi module, I had my HA docker container and replaced the following in /usr/local/lib/python3.10/site-packages/apyhiveapi/api/hive_auth_async.py (line 540)
auth_params = ({"REFRESH_TOKEN": token},)
->auth_params = {"REFRESH_TOKEN": token}
Looks inconsistent (whether correctly or not I dont know) as a few lines below this one its a dict whereas here it is a tuple. Changing it to dict (as above) worked for me after removing and re-adding I got the 2fa code entered it an away it went 😃
Link for ref: https://github.com/Pyhass/Pyhiveapi/blob/master/pyhiveapi/apyhiveapi/api/hive_auth_async.py#LL540C50-L540C50
I asked on Twitter, apparently the next release will fix the 2FA failure to disable… https://twitter.com/HiveHelper/status/1635999799836045314?s=20