uc-config 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,15 @@ npx uc-config init --refresh-docs
9
9
  npx uc-config compile && npx uc-config plan # must show 0 operations
10
10
  ```
11
11
 
12
+ ## 0.2.5
13
+
14
+ Action required: none.
15
+
16
+ - `plan` no longer rejects a `select_source` value on entities that publish no
17
+ `source_list` (e.g. the Onkyo/Pioneer/Integra eISCP driver, which takes free
18
+ text like `input-selector tv`). Any non-empty string is accepted there; a
19
+ published list is still enforced.
20
+
12
21
  ## 0.2.4
13
22
 
14
23
  Action required: none. Existing configs keep their keys.
package/dist/adapter.js CHANGED
@@ -530,7 +530,12 @@ export function validateCommandParameters(command, metadata, entity) {
530
530
  const choices = isObject(source)
531
531
  ? source[String(p.items.field)]
532
532
  : undefined;
533
- valid = Array.isArray(choices) && choices.includes(value);
533
+ // Some drivers (e.g. Onkyo eISCP) publish no list at all and accept free
534
+ // text such as "input-selector tv". With no list there is nothing to check
535
+ // against, so accept any non-empty string; a published list is enforced.
536
+ valid = Array.isArray(choices)
537
+ ? choices.includes(value)
538
+ : typeof value === "string" && value.trim() !== "";
534
539
  }
535
540
  else
536
541
  throw new Error(`Unsupported parameter metadata for ${key}`);
package/docs/snippets.md CHANGED
@@ -138,6 +138,12 @@ sequences: {
138
138
 
139
139
  `select_source` values are entity-specific. Copy them from an existing sequence
140
140
  or the entity's `attributes.source_list` (`npm run uc -- api GET /entities/<id>`).
141
+ When the entity publishes a `source_list`, the planner rejects values outside it.
142
+ Some drivers publish none and accept free text instead; the planner then accepts
143
+ any non-empty string, so take the value from the driver's documentation. For
144
+ example, the Onkyo/Pioneer/Integra eISCP driver takes `input-selector <name>`
145
+ (`input-selector tv`, `input-selector bd`, `input-selector game`; see its
146
+ [text commands](https://github.com/EddyMcNut/uc-intg-onkyo-avr/blob/main/docs/cheats.md#text-commands)).
141
147
 
142
148
  ## Create a new activity
143
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uc-config",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "Configuration-as-code for the Unfolded Circle Remote 3, designed to be driven by coding agents",
6
6
  "license": "MIT",