From eb6c7535147589b9537ea37f39d79cfda61649fd Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 29 Jan 2018 10:17:53 +0100 Subject: [PATCH] Add support for undocument ha version inside wesocket (#333) --- hassio/api/proxy.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hassio/api/proxy.py b/hassio/api/proxy.py index 9b25ec618..27a6c7cfc 100644 --- a/hassio/api/proxy.py +++ b/hassio/api/proxy.py @@ -133,9 +133,15 @@ class APIProxy(CoreSysAttributes): await server.prepare(request) # handle authentication - await server.send_json({'type': 'auth_required'}) + await server.send_json({ + 'type': 'auth_required', + 'ha_version': self._homeassistant.version, + }) await server.receive_json() # get internal token - await server.send_json({'type': 'auth_ok'}) + await server.send_json({ + 'type': 'auth_ok', + 'ha_version': self._homeassistant.version, + }) # init connection to hass client = await self._websocket_client()