{
  "name": "com.acme.pump.set_flow",
  "kind": "command",
  "title": "Set pump flow",
  "description": "Set the flow target of a pump.",
  "inputSchema": {
    "type": "object",
    "required": [
      "litresPerMin"
    ],
    "properties": {
      "litresPerMin": {
        "type": "integer",
        "minimum": 0,
        "maximum": 120
      }
    },
    "additionalProperties": false
  },
  "risk": "write",
  "privacy": "internal",
  "physical": true,
  "callers": [
    "human"
  ],
  "native": {
    "protocol": "modbus-tcp",
    "target": "unit:3",
    "request": {
      "function": 6,
      "register": 20,
      "value": "{{arguments.litresPerMin}}"
    },
    "timeoutMs": 2000
  },
  "guards": {
    "whenStatus": [
      "healthy",
      "degraded"
    ],
    "minIntervalSec": 5,
    "interlocks": [
      {
        "signal": "com.acme.tank.level",
        "op": ">",
        "value": 10
      }
    ]
  }
}
