feat: (CLI) pass --home through to home_id on hot-path commands - #115
Merged
Merged
Conversation
list/get/set/scenes/trigger/search/device-map already had socket support for home_id; only manage/automations surfaces exposed --home. Wire the same option on the day-to-day commands so multi-home agents can target a home without flipping the configured default. Also: parse-test parity (cross-command suite + nil defaults) and README / OpenClaw skill examples for the new flags.
omarshahine
added a commit
that referenced
this pull request
Sep 21, 2026
* Reject unknown explicit homes instead of falling back to the primary filteredHomes falls back to the primary home when an explicit home_id matches nothing. With --home now on set/trigger (#115), a typo such as `set "Kitchen Light" power true --home Cabni` would write to a same-named accessory in the wrong home. The socket server now rejects any home_id / home that names no known home with "Home not found: <id>", for every command, before dispatch. UUID matching is also case-insensitive now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Validate explicit homes only after HomeKit is ready Greptile: knowsHome let every home through while the home list was still empty at startup, so an early `set --home <typo>` could resolve to the primary-home fallback once HomeKit loaded. Wait for readiness first; every command that takes a home already waits for it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Merged
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
Day-to-day CLI commands (
list/get/set/scenes/trigger/search/device-map) did not expose--home, even though the Unix socket already acceptshome_idfor those verbs. Manage/automations surfaces already had the flag. Multi-home setups had to flipconfig --default-home(or guess which home the active default pointed at).This wires the same
--home <name-or-uuid>option onto the hot-path commands and forwards it ashome_id, matchingget-sceneand the structure/automations pattern.Also updates README + OpenClaw HomeKit skill examples, and extends
CommandParsingTestswith per-command coverage plus a cross-command suite mirroring--home is honoured across structure commands.Non-goals (follow-ups)
import-scene/update-scene/delete-scene/assign-roomsstill sendargs["home"](pre-existing; different socket shape) — not changed here.status/eventsare not per-home on the socket today.Test plan
swift test— 188/188 green (includes new hot-path--homeparse suite)swift build --product homeclaw-cli -c releaselist --home Tranquility --category lightbulbvslist --home Eastwind --category lightbulb(different counts)set … --home …swift teston this PR