Use new format for logging exceptions - api/proxy.py (#3187)

This commit is contained in:
Anand Borkar 2021-10-02 14:59:12 +05:30 committed by GitHub
parent 0afff9a9e2
commit b83da5d89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,10 +122,10 @@ class APIProxy(CoreSysAttributes):
if data.get("type") != "auth_required": if data.get("type") != "auth_required":
# Invalid protocol # Invalid protocol
_LOGGER.error( raise APIError(
"Got unexpected response from Home Assistant WebSocket: %s", data f"Got unexpected response from Home Assistant WebSocket: {data}",
_LOGGER.error,
) )
raise APIError()
# Auth session # Auth session
await self.sys_homeassistant.api.ensure_access_token() await self.sys_homeassistant.api.ensure_access_token()