{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.sensor.gpio.schema.json",
  "title": "rig.sensor.gpio",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "pin": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "mode": {
      "type": "string",
      "enum": [
        "in",
        "out"
      ]
    },
    "level": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "device": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    }
  },
  "required": [
    "pin",
    "mode"
  ]
}
