Skip to content

Commit 85fa575

Browse files
fix(addon): enable ingress so the stable add-on shows the Open Web UI / Settings UI (#1486)
* fix(addon): enable ingress so the stable add-on shows the Open Web UI / Settings UI The stable Home Assistant add-on (homeassistant-addon/) never declared ingress, so HA rendered no "Open Web UI" button and the web Settings UI was unreachable on stable -- even though start.py already mounts the settings routes for the ingress proxy (#960) and #1431 wired beta access into stable's code. Mirror the dev add-on's proven ingress block, add a regression assertion, and document that functional addon config is not auto-synced between the dev/stable flavors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(addon): assert ingress_stream in the stable add-on config Reviewers (Gemini + PR toolkit) noted the regression test locked ingress and ingress_port but not ingress_stream, which the fix also added. Assert it so a silent drop of the streaming key is caught too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(addon): document the stable web Settings UI and clarify config sync - Add a "Tool Settings Web UI" section to the stable add-on DOCS.md (it already referenced the web UI / Tool Security Policies tab but never said how to open it); stable-adjusted from the dev flavor, dropping dev-only text-field options. - Note in config.yaml why ingress_stream is required (streamable-HTTP transport). - Fix AGENTS.md: changelog is synced by the "Copy changelog" step in the semantic-release job, not by update-addon-config (which only bumps version). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ea7b614 commit 85fa575

4 files changed

Lines changed: 60 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,22 @@ Before adding docs to tool descriptions, test what models already know using a n
849849
- `repository.yaml` (root) - For HA add-on store recognition
850850
- `homeassistant-addon/config.yaml` - Must match `pyproject.toml` version
851851

852+
**Two add-on flavors:** `homeassistant-addon/` (stable, slug `ha_mcp`) and
853+
`homeassistant-addon-dev/` (dev channel, slug `ha_mcp_dev`) are *separate*
854+
add-ons with *separate* `config.yaml` files.
855+
856+
**Functional config is NOT auto-synced between them.** The release pipeline
857+
only syncs the *version* (the `update-addon-config` job) and the *changelog*
858+
(the `Copy changelog to addon directory` step in `semver-release.yml`) into
859+
`homeassistant-addon/`. Functional keys — `ingress`, `ports`,
860+
`host_network`, `options`/`schema`, etc. — must be edited **by hand** in each
861+
flavor. When you add a non-beta capability to the dev add-on that should also
862+
ship on stable (e.g. `ingress` for the web Settings UI / "Open Web UI" button),
863+
mirror it into `homeassistant-addon/config.yaml` **in the same PR**. Assuming
864+
"the release pipeline handles it" is what kept `ingress` off the stable add-on.
865+
Beta-only keys are the deliberate exception — see the NOTE in
866+
`homeassistant-addon/config.yaml` and `docs/beta.md`.
867+
852868
**Docs**: https://developers.home-assistant.io/docs/add-ons
853869

854870
## API Research

homeassistant-addon/DOCS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,22 @@ Per-tool rules (including argument conditions like `args.domain in ['lock', 'ala
321321

322322
---
323323

324+
## Tool Settings Web UI
325+
326+
The add-on exposes a web-based settings page for managing which tools are available to AI assistants. Click **"Open Web UI"** on the add-on info page to access it.
327+
328+
Features:
329+
- **Enable/disable individual tools** — toggle each tool on or off
330+
- **Pin tools** — keep tools always visible when `enable_tool_search` is on
331+
- **Per-group master toggle** — enable/disable all tools in a group (HACS, System, etc.) with one click
332+
- **Search** — filter tools by name or title
333+
- **Mandatory tools** — `ha_search_entities`, `ha_get_overview`, `ha_get_state`, `ha_report_issue` are always enabled and cannot be disabled
334+
- **Tool Security Policies tab** — when `enable_tool_security_policies` is on, approve held tool calls and manage per-tool rules here
335+
- **Advanced settings** — an advanced panel with a beta master toggle (plus per-feature sub-toggles) for opting into beta tools such as raw YAML editing, filesystem tools, and code mode. See [Beta Features](https://github.com/homeassistant-ai/ha-mcp/blob/master/docs/beta.md)
336+
- **In-UI restart** — a "Restart Add-on" button appears after saving to apply changes with one click
337+
338+
**Important:** Tool configuration changes require an add-on restart to take effect. The UI will prompt you to restart after saving.
339+
324340
## Security
325341

326342
### Auto-Generated Secret Paths

homeassistant-addon/config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ arch:
1111
init: false
1212
startup: application
1313
boot: manual
14+
# Expose the web Settings UI via Supervisor ingress (the "Open Web UI" button).
15+
# start.py mounts the settings routes for the ingress proxy and binds 0.0.0.0;
16+
# this declaration is what makes Supervisor render the button and proxy to it.
17+
# ingress_stream keeps the proxy streaming responses (required for the
18+
# streamable-HTTP MCP transport / settings UI flush behaviour).
19+
# Must be set here too — the release pipeline syncs only version/changelog, not
20+
# functional config, so ingress is NOT auto-mirrored from
21+
# homeassistant-addon-dev/config.yaml.
22+
ingress: true
23+
ingress_port: 9583
24+
ingress_stream: true
1425
# Enable access to Supervisor API for auto-discovery
1526
hassio_api: true
1627
# `manager` (not `default`) is required so the Supervisor token grants access

tests/addon/test_addon_structure.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ def test_config_yaml_valid(self):
6262
assert "ports" in config, "ports section required for HTTP transport"
6363
assert "9583/tcp" in config["ports"], "port 9583/tcp must be exposed"
6464

65+
# Verify ingress is enabled so the stable add-on exposes the web
66+
# Settings UI ("Open Web UI" button). This must stay declared here —
67+
# the release pipeline syncs version/changelog only, not functional
68+
# config, so ingress is not auto-mirrored from the dev add-on. Locks
69+
# the regression where stable shipped without the button.
70+
assert config.get("ingress") is True, (
71+
"ingress must be enabled so the 'Open Web UI' button / web Settings "
72+
"UI is reachable on the stable add-on"
73+
)
74+
assert config.get("ingress_port") == 9583, (
75+
"ingress_port must be 9583 (the fixed internal MCP/web port)"
76+
)
77+
assert config.get("ingress_stream") is True, (
78+
"ingress_stream must be enabled so streamed responses flush through "
79+
"the ingress proxy (streamable-HTTP MCP transport)"
80+
)
81+
6582
# Verify secret_path configuration (optional advanced override)
6683
assert "secret_path" not in config["options"], (
6784
"secret_path should be optional and omitted so Supervisor treats it as advanced"

0 commit comments

Comments
 (0)