hassio: add Home Assistant add-on support - #127
Open
stkang wants to merge 1 commit into
Open
Conversation
Add the add-on manifest (config.yaml), repository descriptor, and docs, and load config from the add-on options when running as a Hassio add-on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 14, 2026
Owner
|
Thank you for the PR. I've just returned from vacation and I'm slowly working through the PR & issue backlog. I'd appreciate your patience :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR packages
rethink-cloudas a native Home Assistant add-on, so it canbe installed from the Add-on Store, configured from the UI, and managed through
the Supervisor — no manual config file editing or separate container required.
Running as an add-on is opt-in and fully backward compatible: the existing
config.jsonflow is untouched. The add-on path only activates when the HomeAssistant Supervisor's options file (
/data/options.json) is present.What's included
hassio/config.yaml— Add-on manifest: identity, supported architectures(
aarch64,amd64,armv7), device-facing ports, Ingress web UI panel,the
mqtt:needservice dependency, and the user-configurable options schema.hassio/DOCS.md— End-user documentation shown on the add-on page:how it works, requirements, installation, options reference, ports, and
data/persistence notes.
repository.yaml— Add-on repository descriptor so the repo can be addedto Home Assistant as a custom add-on source.
util/hassio.ts— Builds aRawConfigfrom the add-on options(
/data/options.json), with sensible defaults and MQTT broker resolution.tests/util/hassio.test.ts— Unit tests covering option parsing, defaults,and MQTT resolution.
rethink-cloud.ts— Detects add-on mode via the options file and loads theconfig from options instead of
config.json; the file-based path is unchanged.How it works
/data/options.jsonand mounts thepersistent data volume.
rethink-cloudchecks for that file. If present, it callsloadHassioConfig()to build the config from options; otherwise it readsconfig.jsonas before.mqtt_urlwins; otherwise the add-on asks theSupervisor for the Home Assistant MQTT service (
mqtt:need, auto-detected);otherwise it falls back to
mqtt://localhost:1883.directly from the add-on page with no extra port or login.
Configuration
All options are exposed under the add-on's Configuration tab and validated
against the schema in
config.yaml. Key options:hostname,discovery_prefix,rethink_prefix,bridge(ThinQ cloud bridge mode),mqtt_url/mqtt_user/mqtt_pass, andlog. Seehassio/DOCS.mdfor the full reference.Testing
tests/util/hassio.test.tscovers option parsing, default fallbacks, and MQTTbroker resolution (explicit URL, Supervisor service, localhost fallback).
/data/options.json, the existingconfig.jsonflow runs unchanged.Notes
not affiliated with LG and is provided WITHOUT ANY WARRANTY.