From 1148c462417369640fc0a821d1879d0c9426ed30 Mon Sep 17 00:00:00 2001 From: charliekerfoot Date: Sat, 2 May 2026 16:19:13 -0500 Subject: [PATCH] fix(gateway): correct ws scheme conversion for https urls --- gateway/platforms/homeassistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/platforms/homeassistant.py b/gateway/platforms/homeassistant.py index 746465594..6bc9ae6eb 100644 --- a/gateway/platforms/homeassistant.py +++ b/gateway/platforms/homeassistant.py @@ -139,7 +139,7 @@ class HomeAssistantAdapter(BasePlatformAdapter): async def _ws_connect(self) -> bool: """Establish WebSocket connection and authenticate.""" - ws_url = self._hass_url.replace("http://", "ws://").replace("https://", "wss://") + ws_url = self._hass_url.replace("https://", "wss://").replace("http://", "ws://") ws_url = f"{ws_url}/api/websocket" self._session = aiohttp.ClientSession(