{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hypervolt/json-schema/hypervolt-placement-update-json-schema.json",
  "title": "PlacementUpdateJson",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hypervolt-openapi.json#/components/schemas/PlacementUpdateJson",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "currency": {
      "description": "A 3-character currency code",
      "type": "string"
    },
    "home_batteries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatteryJson"
      }
    },
    "ct2": {
      "$ref": "#/$defs/Ct2Setup"
    },
    "ct1": {
      "type": "boolean"
    },
    "ct1_inverted": {
      "type": "boolean"
    },
    "has_solar": {
      "type": "boolean"
    },
    "meter_ref": {
      "description": "A reference to a specific boundary meter, prefixed by the scheme.",
      "type": "string"
    },
    "address": {
      "$ref": "#/$defs/PostalAddress"
    },
    "energy_supplier": {
      "$ref": "#/$defs/EnergySupplier"
    },
    "boost_only_smart_charging": {
      "type": "boolean"
    }
  },
  "$defs": {
    "AC": {
      "title": "AC",
      "type": "object"
    },
    "BatteryJson": {
      "title": "BatteryJson",
      "description": "A home-battery",
      "type": "object",
      "properties": {
        "make": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "unit_count": {
          "type": "integer",
          "format": "int32"
        },
        "unit_capacity_in_wh": {
          "type": "integer",
          "format": "int32"
        },
        "power_coupling": {
          "$ref": "#/$defs/PowerCoupling"
        }
      }
    },
    "Both": {
      "title": "Both",
      "type": "object"
    },
    "Ct2Setup": {
      "title": "Ct2Setup",
      "type": "string",
      "enum": [
        "battery",
        "hybrid",
        "none",
        "solar"
      ]
    },
    "DC": {
      "title": "DC",
      "type": "object"
    },
    "EnergySupplier": {
      "title": "EnergySupplier",
      "description": "The Energy supplier for this location.",
      "oneOf": [
        {
          "$ref": "#/$defs/Known"
        },
        {
          "$ref": "#/$defs/Other"
        }
      ]
    },
    "GB": {
      "title": "GB",
      "type": "object",
      "required": [
        "street",
        "postalCode"
      ],
      "properties": {
        "street": {
          "type": "string"
        },
        "town": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        }
      }
    },
    "Known": {
      "title": "Known",
      "description": "A known energy supplier",
      "type": "object",
      "required": [
        "supplier"
      ],
      "properties": {
        "supplier": {
          "description": "A known energy supplier. Can be one of BritishGas Edf Eon Octopus Ovo ScottishPower",
          "type": "string"
        }
      }
    },
    "Other": {
      "title": "Other",
      "description": "The an unknown energy supplier",
      "type": "object",
      "required": [
        "supplier"
      ],
      "properties": {
        "supplier": {
          "type": "string"
        }
      }
    },
    "PostalAddress": {
      "title": "PostalAddress",
      "oneOf": [
        {
          "$ref": "#/$defs/GB"
        }
      ]
    },
    "PowerCoupling": {
      "title": "PowerCoupling",
      "oneOf": [
        {
          "$ref": "#/$defs/AC"
        },
        {
          "$ref": "#/$defs/Both"
        },
        {
          "$ref": "#/$defs/DC"
        }
      ]
    }
  }
}