docs(config add): clarify --type accepts any block type, not just the aliases - #5
Open
tobsch wants to merge 1 commit into
Open
docs(config add): clarify --type accepts any block type, not just the aliases#5tobsch wants to merge 1 commit into
tobsch wants to merge 1 commit into
Conversation
…ases `config add --help` lists only the friendly aliases (light, switch, memory, timer, …), which reads as an exhaustive set. But `resolve_block_type` falls through to KNOWN_BLOCK_TYPES, so --type also accepts any block type by name (PascalCase/kebab/case-insensitive) — e.g. the logic gates And/Or/Not/Xor. Users and agents reading only --help wrongly conclude logic blocks can't be added. Doc-comment only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1TT6BSmf3uXakmtfexfDt
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.
Problem
lox-cli config add --helpdocuments--typeas:That reads as an exhaustive list of the friendly aliases, so users (and LLM agents driving the CLI) conclude that only those types can be added — e.g. that logic gates can't be created.
In fact
resolve_block_typefalls through the aliasmatchtoKNOWN_BLOCK_TYPES, so--typealso accepts any block type by name (PascalCase, case-insensitive, or kebab-case) — including the wholelogiccategory:Fix
Doc-comment only — no behavior change. Clarifies that the listed names are friendly aliases, and that
--typeadditionally accepts any type fromlox-cli blocks list(e.g.And/Or/Not/Xor).This came up while an agent was building a multi-room "good night" logic and initially (wrongly) concluded the gates had to be added in Loxone Config, purely because of the
--helpwording.🤖 Generated with Claude Code