{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/easee/json-schema/easee-scheduled-charging-get-schedule-state-response-schema.json",
  "title": "Scheduled_charging_GetScheduleStateResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/easee-state-api-openapi.yml#/components/schemas/Scheduled_charging_GetScheduleStateResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "enabled"
  ],
  "properties": {
    "enabled": {
      "type": "string",
      "description": "The enabled schedule type or 'none' if no schedule is enabled for the charger."
    },
    "delayed": {
      "description": "The stored delayed schedule for the charger.",
      "oneOf": [
        {
          "$ref": "#/$defs/Scheduled_charging_DelayedScheduleModel"
        }
      ]
    },
    "daily": {
      "description": "The stored daily schedule for the charger.",
      "oneOf": [
        {
          "$ref": "#/$defs/Scheduled_charging_DailyScheduleModel"
        }
      ]
    },
    "weekly": {
      "description": "The stored weekly schedule for the charger.",
      "oneOf": [
        {
          "$ref": "#/$defs/Scheduled_charging_WeeklyScheduleModel"
        }
      ]
    },
    "offPeak": {
      "description": "The stored off-peak schedule for the charger.",
      "oneOf": [
        {
          "$ref": "#/$defs/Scheduled_charging_OffPeakScheduleModel"
        }
      ]
    },
    "tariff": {
      "description": "The stored tariff schedule for the charger.",
      "oneOf": [
        {
          "$ref": "#/$defs/Scheduled_charging_TariffScheduleModel"
        }
      ]
    }
  },
  "$defs": {
    "Scheduled_charging_DailyScheduleModel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timezone",
        "periods"
      ],
      "properties": {
        "timezone": {
          "type": "string",
          "description": "IANA time zone identifier for the schedule."
        },
        "periods": {
          "type": "array",
          "description": "Collection of time periods during which charging is permitted.",
          "items": {
            "$ref": "#/$defs/Scheduled_charging_DailySchedulePeriod"
          }
        }
      }
    },
    "Scheduled_charging_DailySchedulePeriod": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "startTime",
        "stopTime",
        "maximumAmps"
      ],
      "properties": {
        "startTime": {
          "type": "string",
          "description": "Start time of the charging period.",
          "format": "time"
        },
        "stopTime": {
          "type": "string",
          "description": "Stop time of the charging period.",
          "format": "time"
        },
        "maximumAmps": {
          "type": "integer",
          "description": "The maximum electrical current in amperes permitted by the schedule during this charging period.",
          "format": "int32"
        }
      }
    },
    "Scheduled_charging_DayOfWeek": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
      ],
      "enum": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday"
      ]
    },
    "Scheduled_charging_DelayedScheduleModel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timezone",
        "startTime",
        "maximumAmps",
        "elapsed"
      ],
      "properties": {
        "timezone": {
          "type": "string",
          "description": "IANA time zone identifier for the schedule."
        },
        "startTime": {
          "type": "string",
          "description": "Start time of the charging schedule.",
          "format": "time"
        },
        "maximumAmps": {
          "type": "integer",
          "description": "The maximum electrical current in amperes available to the vehicle throughout the charging schedule.",
          "format": "int32"
        },
        "elapsed": {
          "type": "boolean",
          "description": "Whether the StartTime has elapsed, after which the MaximumAmps limit applies indefinitely."
        }
      }
    },
    "Scheduled_charging_OffPeakRandomizedDelay": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether randomized delay is enabled for the schedule."
        },
        "maximumSeconds": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The configured maximum delay in seconds for the schedule.",
          "format": "int32"
        },
        "actualSeconds": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The actual randomized delay offset calculated for this schedule.",
          "format": "int32"
        }
      }
    },
    "Scheduled_charging_OffPeakScheduleModel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timezone",
        "template",
        "randomizedDelay",
        "periods"
      ],
      "properties": {
        "timezone": {
          "type": "string",
          "description": "IANA timezone identifier of timezone to use for the schedule."
        },
        "template": {
          "type": "string",
          "description": "The off-peak template the schedule is based on."
        },
        "randomizedDelay": {
          "description": "The configured parameters for randomized delay.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_OffPeakRandomizedDelay"
            }
          ]
        },
        "periods": {
          "type": "array",
          "description": "Collection of time periods during which charging is permitted.",
          "items": {
            "$ref": "#/$defs/Scheduled_charging_OffPeakSchedulePeriod"
          }
        }
      }
    },
    "Scheduled_charging_OffPeakSchedulePeriod": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "startDay",
        "startTime",
        "stopDay",
        "stopTime",
        "maximumAmps"
      ],
      "properties": {
        "startDay": {
          "description": "The day of week on which the schedule period begins.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_DayOfWeek"
            }
          ]
        },
        "startTime": {
          "type": "string",
          "description": "The time of day on which the schedule period begins.",
          "format": "time"
        },
        "stopDay": {
          "description": "The day of week on which the schedule period ends.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_DayOfWeek"
            }
          ]
        },
        "stopTime": {
          "type": "string",
          "description": "The time of day on which the schedule period ends.",
          "format": "time"
        },
        "maximumAmps": {
          "type": "integer",
          "description": "The maximum electrical current in amperes permitted by the schedule during this charging period.",
          "format": "int32"
        }
      }
    },
    "Scheduled_charging_ReadyByTimeEntry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "day",
        "time"
      ],
      "properties": {
        "day": {
          "$ref": "#/$defs/Scheduled_charging_DayOfWeek"
        },
        "time": {
          "type": "string",
          "format": "time"
        }
      }
    },
    "Scheduled_charging_TariffPeriod": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "start",
        "stop",
        "maximumAmps"
      ],
      "properties": {
        "start": {
          "type": "string",
          "description": "The instant at which charging is permitted to begin.",
          "format": "date-time"
        },
        "stop": {
          "type": "string",
          "description": "The instant at which charging is no longer permitted.",
          "format": "date-time"
        },
        "maximumAmps": {
          "type": "integer",
          "description": "The maximum current in amperes permitted during this period.",
          "format": "int32"
        }
      }
    },
    "Scheduled_charging_TariffScheduleModel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timezone",
        "status",
        "settings",
        "periods"
      ],
      "properties": {
        "timezone": {
          "type": "string",
          "description": "IANA time zone identifier for the schedule."
        },
        "status": {
          "type": "string",
          "description": "Current lifecycle status of the schedule."
        },
        "settings": {
          "description": "The settings the schedule was generated from.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_TariffSettings"
            }
          ]
        },
        "periods": {
          "type": "array",
          "description": "Collection of absolute time periods during which charging is permitted.",
          "items": {
            "$ref": "#/$defs/Scheduled_charging_TariffPeriod"
          }
        }
      }
    },
    "Scheduled_charging_TariffSettings": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fallbackMaximumAmps"
      ],
      "properties": {
        "priceCap": {
          "type": [
            "number",
            "null"
          ],
          "description": "The maximum electricity price set for the schedule.",
          "format": "decimal"
        },
        "readyBy": {
          "type": [
            "array",
            "null"
          ],
          "description": "The set of ready-by times for the schedule.",
          "items": {
            "$ref": "#/$defs/Scheduled_charging_ReadyByTimeEntry"
          }
        },
        "minimumHours": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum number of hours to charge before the next ready-by time.",
          "format": "decimal"
        },
        "fallbackMaximumAmps": {
          "type": "integer",
          "description": "Maximum current in amperes allowed once the schedule has elapsed without regeneration.",
          "format": "int32"
        }
      }
    },
    "Scheduled_charging_WeeklyScheduleModel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timezone",
        "periods"
      ],
      "properties": {
        "timezone": {
          "type": "string",
          "description": "IANA time zone identifier for the schedule."
        },
        "periods": {
          "type": "array",
          "description": "Collection of  time periods during which charging is permitted.",
          "items": {
            "$ref": "#/$defs/Scheduled_charging_WeeklySchedulePeriod"
          }
        }
      }
    },
    "Scheduled_charging_WeeklySchedulePeriod": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "startDay",
        "startTime",
        "stopDay",
        "stopTime",
        "maximumAmps"
      ],
      "properties": {
        "startDay": {
          "description": "The day of week on which the schedule period begins.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_DayOfWeek"
            }
          ]
        },
        "startTime": {
          "type": "string",
          "description": "The time of day on which the schedule period begins.",
          "format": "time"
        },
        "stopDay": {
          "description": "The day of week on which the schedule period ends.",
          "oneOf": [
            {
              "$ref": "#/$defs/Scheduled_charging_DayOfWeek"
            }
          ]
        },
        "stopTime": {
          "type": "string",
          "description": "The time of day on which the schedule period ends.",
          "format": "time"
        },
        "maximumAmps": {
          "type": "integer",
          "description": "The maximum electrical current in amperes permitted by the schedule during this charging period.",
          "format": "int32"
        }
      }
    }
  }
}