{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.watts_amps/1.4.1/input.json",
  "title": "Watts ↔ amps — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "dir": {
      "type": "string",
      "enum": [
        "w-a",
        "a-w"
      ],
      "description": "w-a = watts→amps; a-w = amps→watts"
    },
    "powerOrCurrent": {
      "type": "number",
      "description": "Watts when dir=w-a; amps when dir=a-w"
    },
    "volts": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "RMS volts; L-L when circuit=three"
    },
    "circuit": {
      "type": "string",
      "enum": [
        "dc",
        "single",
        "three"
      ],
      "description": "three = balanced line-to-line AC"
    },
    "power_factor": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1,
      "description": "AC total power factor λ in (0, 1]. Ignored for DC (forced to 1). Legacy alias `pf` accepted by API adapter."
    }
  },
  "required": [
    "powerOrCurrent",
    "volts"
  ],
  "description": "Convert real power and current for DC, single-phase, or three-phase with power factor. (calculation_version 1.4.1)"
}
