mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-18 07:35:22 +01:00
Switch internal Supervisor→Core HTTP/WebSocket communication to use a Unix socket instead of TCP when the installed Core version supports it. The existing /run/supervisor directory on the host (mounted at /run/os inside Supervisor) is bind-mounted into the Core container as /run/supervisor. Core receives the SUPERVISOR_CORE_API_SOCKET environment variable telling it where to create the socket. Supervisor connects to it via aiohttp.UnixConnector at /run/os/core.sock. All session and URL management lives in HomeAssistantAPI as private properties (_session, _api_url, _ws_url) with a version-gated fallback to the existing TCP path for older Core versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>