{
  "$id": "https://schemas.ruter.no/adt/ota/api/v2.1/sensor/door.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Door",
  "type": "object",
  "required": [
    "doorOpen",
    "atDateTime"
  ],
  "description": "Describes if any door is open (or to be more precise – if the door lock is released). Also see topic pe/doors_individually for status on individual doors.",
  "additionalProperties": true,
  "properties": {
    "traceId": {
      "$id": "#/properties/traceId",
      "$comment": "Added in version 2.5",
      "type": "string",
      "description": "A unique identifier to be able to trace this message. Also used to detect duplicate messages received."
    },
    "doorOpen": {
      "$id": "#/properties/doorOpen",
      "type": "boolean",
      "description": "True if any door is open (door lock is released). False if door lock is activated.",
      "examples": [
        "true",
        "false"
      ]
    },
    "atDateTime": {
      "$id": "#/properties/atDateTime",
      "type": "string",
      "description": "ISO 8601. Reflects the UTC time when the state changed."
    }
  },
  "examples": [
    {
      "doorOpen": true,
      "atDateTime": "2021-11-30T23:45:52.006Z",
      "traceId": "2d826a9a-2474-11ed-861d-0242ac120002"
    }
  ]
}
