Skip to content

docs(config add): clarify --type accepts any block type, not just the aliases - #5

Open
tobsch wants to merge 1 commit into
eisber:mainfrom
tobsch:docs/config-add-type-accepts-any-blocktype
Open

docs(config add): clarify --type accepts any block type, not just the aliases#5
tobsch wants to merge 1 commit into
eisber:mainfrom
tobsch:docs/config-add-type-accepts-any-blocktype

Conversation

@tobsch

@tobsch tobsch commented Aug 25, 2026

Copy link
Copy Markdown

Problem

lox-cli config add --help documents --type as:

Control type: light, switch, presence, alarm-clock, memory, timer, mqtt-sub, mqtt-pub, calendar, autopilot, virtual-input.

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_type falls through the alias match to KNOWN_BLOCK_TYPES, so --type also accepts any block type by name (PascalCase, case-insensitive, or kebab-case) — including the whole logic category:

$ lox-cli config add --type Or --title "Kind schläft" copy.Loxone
✓ Added Or 'Kind schläft' (…)          # ports I1/I2/Q, wires with wire-connector, validates

Fix

Doc-comment only — no behavior change. Clarifies that the listed names are friendly aliases, and that --type additionally accepts any type from lox-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 --help wording.

🤖 Generated with Claude Code

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant