From 959ff00c33ece414b7f7b7b2d3df718e69b96faa Mon Sep 17 00:00:00 2001 From: Tobias Schlottke Date: Tue, 25 Aug 2026 06:59:36 +0200 Subject: [PATCH] docs(config add): clarify --type accepts any block type, not just aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 Claude-Session: https://claude.ai/code/session_01V1TT6BSmf3uXakmtfexfDt --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e00c2ce..cb3b516 100644 --- a/src/main.rs +++ b/src/main.rs @@ -580,7 +580,7 @@ pub(crate) enum ConfigCmd { /// Add a control element with type-aware defaults Add { file: String, - /// Control type: light, switch, presence, alarm-clock, memory, timer, mqtt-sub, mqtt-pub, calendar, autopilot, virtual-input. Use --device to bind device-bound types (e.g. alarm-clock) to a LoxAIRDevice. + /// Control type. Friendly aliases: light, switch, presence, alarm-clock, memory, timer, mqtt-sub, mqtt-pub, calendar, autopilot, virtual-input. Beyond these, --type accepts ANY block type from `lox-cli blocks list` (PascalCase or kebab-case) — e.g. logic gates And/Or/Not/Xor. Use --device to bind device-bound types (e.g. alarm-clock) to a LoxAIRDevice. #[arg(long = "type")] control_type: String, /// Element title