feat: expose action input specifications

This commit is contained in:
2026-07-21 10:09:05 +08:00
parent 8fea0c3c11
commit 4ffd1b7eac
4 changed files with 64 additions and 10 deletions
+2
View File
@@ -139,6 +139,8 @@ _, err = device.RunAction(ctx, "toggle", nil)
_ = value
```
执行 action 前可通过 `device.Actions()["toggle"].Inputs` 检查可信 MIoT 描述中的参数类型、范围和值列表。
可通过实际导出的 `DeviceOption` 调整行为:
```go