{"id":7909,"library":"aiohasupervisor","title":"Asynchronous Home Assistant Supervisor Client","description":"aiohasupervisor is an asynchronous Python client designed for interfacing with the Home Assistant Supervisor's REST API. It is currently at version 0.4.3 and is actively maintained, with a release cadence tied to the development and releases of Home Assistant itself, as it's primarily used within the Home Assistant ecosystem, particularly by its Supervisor integration and add-ons.","status":"active","version":"0.4.3","language":"python","source_language":"en","source_url":"https://github.com/home-assistant-libs/python-supervisor-client","tags":["home-assistant","supervisor","async","client","api"],"install":[{"cmd":"pip install aiohasupervisor","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"wrong":"from aiohasupervisor.client import Client","symbol":"SupervisorClient","correct":"from aiohasupervisor import SupervisorClient"}],"quickstart":{"code":"import asyncio\nimport os\nfrom aiohasupervisor.client import Client\n\nasync def get_supervisor_info():\n    # The SUPERVISOR_TOKEN environment variable is automatically set for Home Assistant add-ons.\n    # For remote development/testing, use the remote_api add-on to get a token and set SUPERVISOR_API_URL.\n    supervisor_token = os.environ.get('SUPERVISOR_TOKEN', 'YOUR_SUPERVISOR_TOKEN')\n    supervisor_api_url = os.environ.get('SUPERVISOR_API_URL', 'http://supervisor/core') # Default for add-ons\n\n    if supervisor_token == 'YOUR_SUPERVISOR_TOKEN':\n        print(\"Warning: SUPERVISOR_TOKEN not set. This example may not work without a valid token.\")\n        print(\"Please refer to the aiohasupervisor GitHub for development setup with remote_api add-on.\")\n        return\n\n    async with Client(supervisor_api_url, supervisor_token) as client:\n        try:\n            info = await client.info()\n            print(\"Supervisor Info:\", info)\n        except Exception as e:\n            print(f\"Error fetching Supervisor info: {e}\")\n\nif __name__ == \"__main__\":\n    asyncio.run(get_supervisor_info())\n","lang":"python","description":"This quickstart demonstrates how to initialize the `aiohasupervisor` client and fetch basic supervisor information. It expects the `SUPERVISOR_TOKEN` environment variable to be set, which is automatically handled when running as a Home Assistant add-on. For external development, the `SUPERVISOR_API_URL` should also be set, and a token obtained from the `remote_api` add-on."},"warnings":[{"fix":"For Home Assistant Core venv installations, either modify `addon_panel.py` to handle the `IngressPanel` import gracefully (e.g., with a try-except block) or create an empty `custom_component/hassio/__init__.py` to prevent the `hassio` integration from loading.","message":"The `IngressPanel` class was removed from `aiohasupervisor.models`. Home Assistant Core installations (especially venv) starting from 2026.4 might fail to start if they incorrectly try to import this class via the `hassio` integration.","severity":"breaking","affected_versions":"aiohasupervisor versions used by Home Assistant Core 2026.4+"},{"fix":"Ensure `SUPERVISOR_TOKEN` is set (automatically in add-ons, manually from `remote_api` for development). For remote access, set `SUPERVISOR_API_URL` to your Home Assistant instance's IP.","message":"The library heavily relies on `SUPERVISOR_TOKEN` and optionally `SUPERVISOR_API_URL` environment variables for authentication and endpoint discovery. Without these, the client cannot connect to the Home Assistant Supervisor.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `aiohasupervisor` is updated to a stable release version. If encountering resolution issues with Home Assistant Core, try using `--prerelease=allow` with your package manager as a temporary workaround, though a proper fix involves stable dependency versions.","message":"Older versions of `aiohasupervisor` (e.g., 0.2.2b5) were sometimes included as pre-release dependencies in Home Assistant Core, causing issues with dependency resolvers like `uv`.","severity":"deprecated","affected_versions":"Prior to 0.3.x, specifically 0.2.2b5 and related pre-releases."}],"env_vars":null,"search_vec":"'0.4.3':28 'activ':31 'add':64 'add-on':63 'aiohasupervisor':6 'api':22,72 'assist':3,18,45,55,68 'async':70 'asynchron':1,9 'cadenc':36 'client':5,11,71 'current':25 'design':12 'develop':40 'ecosystem':56 'home':2,17,44,54,67 'home-assist':66 'integr':61 'interfac':14 'maintain':32 'on':65 'particular':57 'primarili':50 'python':10 'releas':35,42 'rest':21 'supervisor':4,19,60,69 'tie':37 'use':51 'version':27 'within':52","created_at":"2026-04-16T16:58:54.978521+00:00","updated_at":"2026-04-16T16:58:54.978521+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.5.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://www.home-assistant.io/","github":"https://github.com/home-assistant-libs/python-supervisor-client","docs":null,"changelog":null,"pypi":"https://pypi.org/project/aiohasupervisor/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}