{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://couchtv.joshuaseage.com/help/design-format.schema.json",
  "title": "couch-tv design",
  "description": "A couch-tv TV home made of widgets on a grid. A file holds { \"design\": {...} } or the design alone. See DESIGN-FORMAT.md.",
  "x-limits": {
    "fileBytes": 262144,
    "storedBytes": 65536,
    "depth": 8,
    "parts": 4000,
    "listItems": 200,
    "keysPerObject": 120,
    "stringLength": 2000,
    "widgets": 40,
    "googleFontFamilies": 3,
    "appsPerWidget": 16
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "design"
      ],
      "additionalProperties": false,
      "properties": {
        "design": {
          "$ref": "#/$defs/design"
        },
        "purpose": {
          "type": "string",
          "maxLength": 40
        }
      }
    },
    {
      "$ref": "#/$defs/design"
    }
  ],
  "$defs": {
    "design": {
      "type": "object",
      "required": [
        "objects",
        "grid"
      ],
      "additionalProperties": false,
      "properties": {
        "v": {
          "const": 1
        },
        "background": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "image"
              ],
              "additionalProperties": false,
              "description": "One of the TV's own photos.",
              "properties": {
                "image": {
                  "enum": [
                    "backgrounds/albury-storm.jpg",
                    "backgrounds/aresquiers-beach.jpg",
                    "backgrounds/grose-valley.jpg",
                    "backgrounds/loop-clouds.jpg",
                    "backgrounds/loop-fire.jpg",
                    "backgrounds/loop-ocean.jpg",
                    "backgrounds/loop-rain.jpg",
                    "backgrounds/tessellated-pavement.jpg",
                    "backgrounds/vang-vieng-sunset.jpg",
                    "backgrounds/scene-dawn.jpg",
                    "backgrounds/scene-fog.jpg",
                    "backgrounds/scene-golden.jpg",
                    "backgrounds/scene-night.jpg",
                    "backgrounds/scene-water.jpg"
                  ]
                },
                "depth": {
                  "type": "boolean",
                  "description": "A scene photo's hills stand in front of widgets on layer \"back\"."
                },
                "darken": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 0.9
                },
                "zoom": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 4
                },
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "y": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "blur": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 16
                },
                "scrim": {
                  "enum": [
                    "top",
                    "bottom",
                    "left",
                    "right",
                    "even"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "colour"
              ],
              "additionalProperties": false,
              "description": "A colour, or two as a gradient.",
              "properties": {
                "colour": {
                  "type": "string",
                  "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
                  "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
                },
                "colour2": {
                  "type": "string",
                  "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
                  "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
                },
                "angle": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 360
                },
                "radial": {
                  "type": "boolean"
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "minProperties": 1,
              "description": "Settings for your own photo, which is uploaded beside the file (never inside it).",
              "properties": {
                "darken": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 0.9
                },
                "zoom": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 4
                },
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "y": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "blur": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 16
                },
                "scrim": {
                  "enum": [
                    "top",
                    "bottom",
                    "left",
                    "right",
                    "even"
                  ]
                }
              }
            }
          ]
        },
        "home": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "scenes": {
              "type": "array",
              "maxItems": 20,
              "items": {
                "enum": [
                  "night",
                  "fog",
                  "golden",
                  "dawn",
                  "water"
                ]
              },
              "description": "couch-tv's scenes taking turns, when there is no background."
            },
            "scene_seconds": {
              "type": "integer",
              "minimum": 5,
              "maximum": 3600
            },
            "glass_amount": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "dock_size": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "glass": {
              "enum": [
                "on",
                "lite",
                "off"
              ]
            },
            "clock_style": {
              "enum": [
                "frosted",
                "liquid"
              ]
            },
            "dock": {
              "enum": [
                "classic",
                "mac"
              ]
            },
            "clock": {
              "enum": [
                "12h",
                "24h"
              ]
            },
            "glass_icons": {
              "type": "boolean"
            },
            "ambient_weather": {
              "type": "boolean"
            },
            "ambient_sun_grade": {
              "type": "boolean"
            },
            "moving_tiles": {
              "type": "boolean"
            },
            "lighter": {
              "type": "boolean"
            },
            "keep_watching": {
              "type": "boolean"
            },
            "now_playing": {
              "type": "boolean"
            }
          }
        },
        "look": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "ink": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "sub": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "panel": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "rim": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "solid": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "paper": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "accent": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "focus": {
              "type": "string",
              "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
              "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
            },
            "icons": {
              "enum": [
                "line",
                "solid",
                "duotone",
                "tile",
                "glass",
                "playful",
                "classic"
              ]
            },
            "night_red": {
              "type": "boolean"
            }
          }
        },
        "elements": {
          "type": "object",
          "additionalProperties": false,
          "description": "The home's own parts. In a widget design every one is hidden: the widgets draw everything.",
          "properties": {
            "clock": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "date": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "weather": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "people": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "quick": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "keep_watching": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            },
            "dock": {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "objects": {
          "type": "array",
          "maxItems": 40,
          "items": {
            "$ref": "#/$defs/widget"
          }
        },
        "grid": {
          "type": "object",
          "required": [
            "on",
            "v",
            "items"
          ],
          "properties": {
            "on": {
              "const": true
            },
            "v": {
              "const": 2
            },
            "items": {
              "type": "object",
              "additionalProperties": false,
              "patternProperties": {
                "^obj:[A-Za-z0-9_-]{1,60}$": {
                  "type": "object",
                  "required": [
                    "c",
                    "r",
                    "size"
                  ],
                  "properties": {
                    "c": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 17
                    },
                    "r": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9
                    },
                    "size": {
                      "$ref": "#/$defs/size"
                    }
                  }
                }
              }
            },
            "order": {
              "type": "array",
              "maxItems": 40,
              "items": {
                "type": "string"
              }
            },
            "placed": {
              "type": "object"
            }
          },
          "description": "The widget grid: 18 half columns by 10 half rows (9 x 5 tiles) on a 1920 x 1080 screen. No two widgets share a cell."
        }
      }
    },
    "widget": {
      "type": "object",
      "required": [
        "id",
        "type",
        "kind"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,60}$",
          "not": {
            "enum": [
              "__proto__",
              "constructor",
              "prototype"
            ]
          },
          "description": "Unique in the design. Its grid place is grid.items[\"obj:<id>\"]."
        },
        "type": {
          "const": "widget"
        },
        "kind": {
          "enum": [
            "clock",
            "tallclock",
            "glassclock",
            "analog",
            "flipclock",
            "wordclock",
            "solar",
            "worldclock",
            "countdown",
            "date",
            "month",
            "timer",
            "weather",
            "bigtemp",
            "hourly",
            "week",
            "rain",
            "uv",
            "sun",
            "moon",
            "air",
            "surf",
            "photo",
            "slideshow",
            "mosaic",
            "artframe",
            "memory",
            "keep",
            "keeprow",
            "upnext",
            "picks",
            "app",
            "folder",
            "dock",
            "appgrid",
            "games",
            "nowplaying",
            "soundscape",
            "queue",
            "speakers",
            "aircon",
            "scenes",
            "controls",
            "camera",
            "doorbell",
            "energy",
            "sensor",
            "battery",
            "bins",
            "people",
            "agenda",
            "note",
            "list",
            "card",
            "quote",
            "word",
            "news",
            "sports",
            "stocks",
            "commute",
            "welcome",
            "quick",
            "wifi",
            "guide",
            "screentime",
            "ask",
            "agent",
            "stack"
          ]
        },
        "size": {
          "$ref": "#/$defs/size"
        },
        "x": {
          "type": "number",
          "minimum": -3840,
          "maximum": 3840
        },
        "y": {
          "type": "number",
          "minimum": -2160,
          "maximum": 2160
        },
        "w": {
          "type": "number",
          "minimum": 40,
          "maximum": 1920
        },
        "h": {
          "type": "number",
          "minimum": 40,
          "maximum": 1080
        },
        "opacity": {
          "type": "number",
          "minimum": 0.05,
          "maximum": 1
        },
        "hidden": {
          "type": "boolean"
        },
        "locked": {
          "type": "boolean"
        },
        "layer": {
          "enum": [
            "front",
            "back"
          ]
        },
        "name": {
          "type": "string",
          "maxLength": 40,
          "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
          "description": "Its name in Studio. Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
        },
        "style": {
          "$ref": "#/$defs/style"
        },
        "opts": {
          "type": "object"
        },
        "start": {
          "type": "boolean",
          "description": "The remote starts here."
        },
        "pinned": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "maxItems": 10,
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/stackItem"
          },
          "description": "kind \"stack\" only: up to ten widgets taking turns in one place."
        },
        "turn": {
          "enum": [
            0,
            10,
            20,
            30,
            60
          ],
          "description": "kind \"stack\" only: seconds each one shows (0: by the remote)."
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/kindOpts"
        }
      ]
    },
    "stackItem": {
      "type": "object",
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "properties": {
        "kind": {
          "enum": [
            "clock",
            "tallclock",
            "glassclock",
            "analog",
            "flipclock",
            "wordclock",
            "solar",
            "worldclock",
            "countdown",
            "date",
            "month",
            "timer",
            "weather",
            "bigtemp",
            "hourly",
            "week",
            "rain",
            "uv",
            "sun",
            "moon",
            "air",
            "surf",
            "photo",
            "slideshow",
            "mosaic",
            "artframe",
            "memory",
            "keep",
            "keeprow",
            "upnext",
            "picks",
            "app",
            "folder",
            "dock",
            "appgrid",
            "games",
            "nowplaying",
            "soundscape",
            "queue",
            "speakers",
            "aircon",
            "scenes",
            "controls",
            "camera",
            "doorbell",
            "energy",
            "sensor",
            "battery",
            "bins",
            "people",
            "agenda",
            "note",
            "list",
            "card",
            "quote",
            "word",
            "news",
            "sports",
            "stocks",
            "commute",
            "welcome",
            "quick",
            "wifi",
            "guide",
            "screentime",
            "ask",
            "agent"
          ]
        },
        "size": {
          "$ref": "#/$defs/size"
        },
        "style": {
          "$ref": "#/$defs/style"
        },
        "opts": {
          "type": "object"
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/kindOpts"
        }
      ]
    },
    "style": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "panel": {
          "enum": [
            "glass",
            "solid",
            "colour",
            "paper",
            "none"
          ]
        },
        "gradient": {
          "enum": [
            "off",
            "soft"
          ]
        },
        "ink": {
          "enum": [
            "auto",
            "white",
            "ink",
            "accent"
          ]
        },
        "font": {
          "anyOf": [
            {
              "enum": [
                "inter",
                "antonio",
                "rounded",
                "cormorant",
                "jost"
              ]
            },
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9 -]{1,64}$",
              "description": "Any Google Fonts family by its name, such as \"Playfair Display\". At most three families in a design; a name Google Fonts does not have is dropped. Never a font file or link."
            }
          ]
        },
        "icons": {
          "enum": [
            "line",
            "solid",
            "duotone",
            "tile",
            "glass",
            "playful",
            "classic"
          ]
        },
        "corners": {
          "enum": [
            "square",
            "soft",
            "round",
            "pill"
          ]
        },
        "shadow": {
          "enum": [
            "none",
            "soft",
            "lifted"
          ]
        },
        "show": {
          "enum": [
            "always",
            "live",
            "night",
            "day"
          ]
        },
        "colour": {
          "type": "string",
          "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
          "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
        },
        "accent": {
          "type": "string",
          "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
          "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
        },
        "opacity": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 1
        }
      }
    },
    "size": {
      "anyOf": [
        {
          "enum": [
            "line",
            "wline",
            "tile",
            "wtile",
            "small",
            "tall",
            "medium",
            "wide",
            "large",
            "xl",
            "hero",
            "full",
            "row8",
            "row12",
            "row18"
          ]
        },
        {
          "type": "string",
          "pattern": "^\\d{1,2}x\\d{1,2}$"
        }
      ],
      "description": "A named size (line 4x1, wline 8x1, tile 2x2, wtile 4x2, small 4x4, tall 4x6, medium 8x4, wide 12x4, large 8x8, xl 12x6, hero 18x7, full 18x10, row8/row12/row18 for a dock), or any \"WxH\" in half cells at or above the kind's least. Each kind takes only some: see DESIGN-FORMAT.md."
    },
    "kindOpts": {
      "allOf": [
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "clock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "format": {
                    "$ref": "#/$defs/opt_format"
                  },
                  "ampm": {
                    "$ref": "#/$defs/opt_ampm"
                  },
                  "seconds": {
                    "$ref": "#/$defs/opt_seconds"
                  },
                  "date": {
                    "$ref": "#/$defs/opt_date"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "tallclock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "format": {
                    "$ref": "#/$defs/opt_format"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "glassclock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "format": {
                    "$ref": "#/$defs/opt_format"
                  },
                  "scene": {
                    "$ref": "#/$defs/opt_scene"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "analog"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "seconds": {
                    "$ref": "#/$defs/opt_seconds"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "flipclock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "format": {
                    "$ref": "#/$defs/opt_format"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "wordclock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "solar"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "worldclock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "cities": {
                    "$ref": "#/$defs/opt_cities"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "countdown"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "month": {
                    "$ref": "#/$defs/opt_month"
                  },
                  "day": {
                    "$ref": "#/$defs/opt_day"
                  },
                  "unit": {
                    "$ref": "#/$defs/opt_unit"
                  },
                  "icon": {
                    "$ref": "#/$defs/opt_icon"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "date"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "show": {
                    "$ref": "#/$defs/opt_show"
                  },
                  "dfmt": {
                    "$ref": "#/$defs/opt_dfmt"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  },
                  "place": {
                    "$ref": "#/$defs/opt_place"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "month"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "timer"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "weather"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "place": {
                    "$ref": "#/$defs/opt_place"
                  },
                  "hilo": {
                    "$ref": "#/$defs/opt_hilo"
                  },
                  "night": {
                    "$ref": "#/$defs/opt_night"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "bigtemp"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "place": {
                    "$ref": "#/$defs/opt_place"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "hourly"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "place": {
                    "$ref": "#/$defs/opt_place"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "week"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "place": {
                    "$ref": "#/$defs/opt_place"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "rain"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "uv"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "sun"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "moon"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "air"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "surf"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "photo"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "image": {
                    "$ref": "#/$defs/opt_image"
                  },
                  "fit": {
                    "$ref": "#/$defs/opt_fit"
                  },
                  "caption": {
                    "$ref": "#/$defs/opt_caption"
                  },
                  "sub": {
                    "$ref": "#/$defs/opt_sub"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "slideshow"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "seconds_each": {
                    "$ref": "#/$defs/opt_seconds_each"
                  },
                  "caption": {
                    "$ref": "#/$defs/opt_caption"
                  },
                  "sub": {
                    "$ref": "#/$defs/opt_sub"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "mosaic"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "count": {
                    "$ref": "#/$defs/opt_count"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "artframe"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "image": {
                    "$ref": "#/$defs/opt_image"
                  },
                  "mat": {
                    "$ref": "#/$defs/opt_mat"
                  },
                  "caption": {
                    "$ref": "#/$defs/opt_caption"
                  },
                  "sub": {
                    "$ref": "#/$defs/opt_sub"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "memory"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "keep"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "keeprow"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "shows": {
                    "$ref": "#/$defs/opt_shows"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "upnext"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  },
                  "sport": {
                    "$ref": "#/$defs/opt_sport"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "picks"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "app"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "folder"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  },
                  "cols": {
                    "$ref": "#/$defs/opt_cols"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "dock"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  },
                  "more": {
                    "$ref": "#/$defs/opt_more"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "appgrid"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  },
                  "cols": {
                    "$ref": "#/$defs/opt_cols"
                  },
                  "names": {
                    "$ref": "#/$defs/opt_names"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "games"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "apps": {
                    "$ref": "#/$defs/opt_apps"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "nowplaying"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "soundscape"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "sound": {
                    "$ref": "#/$defs/opt_sound"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "queue"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "speakers"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "players": {
                    "$ref": "#/$defs/opt_players"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "aircon"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "entity": {
                    "$ref": "#/$defs/opt_entity"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "scenes"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "controls"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "controls": {
                    "$ref": "#/$defs/opt_controls"
                  },
                  "cols": {
                    "$ref": "#/$defs/opt_cols"
                  },
                  "switches": {
                    "$ref": "#/$defs/opt_switches"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "camera"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "cam": {
                    "$ref": "#/$defs/opt_cam"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "doorbell"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "energy"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "sensor"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "reading": {
                    "$ref": "#/$defs/opt_reading"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "battery"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "bins"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "weekday": {
                    "$ref": "#/$defs/opt_weekday"
                  },
                  "alt": {
                    "$ref": "#/$defs/opt_alt"
                  },
                  "anchor": {
                    "$ref": "#/$defs/opt_anchor"
                  },
                  "lid_a": {
                    "$ref": "#/$defs/opt_lid_a"
                  },
                  "lid_b": {
                    "$ref": "#/$defs/opt_lid_b"
                  },
                  "bin_a": {
                    "$ref": "#/$defs/opt_bin_a"
                  },
                  "bin_b": {
                    "$ref": "#/$defs/opt_bin_b"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "people"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "agenda"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "note"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "list"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "icon": {
                    "$ref": "#/$defs/opt_icon"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "card"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "text": {
                    "$ref": "#/$defs/opt_text"
                  },
                  "icon": {
                    "$ref": "#/$defs/opt_icon"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "quote"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "text": {
                    "$ref": "#/$defs/opt_text"
                  },
                  "sub": {
                    "$ref": "#/$defs/opt_sub"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "word"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "news"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "feed": {
                    "$ref": "#/$defs/opt_feed"
                  },
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "sports"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "league": {
                    "$ref": "#/$defs/opt_league"
                  },
                  "team": {
                    "$ref": "#/$defs/opt_team"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "stocks"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "tickers": {
                    "$ref": "#/$defs/opt_tickers"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "commute"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "arrive_h": {
                    "$ref": "#/$defs/opt_arrive_h"
                  },
                  "arrive_m": {
                    "$ref": "#/$defs/opt_arrive_m"
                  },
                  "buffer": {
                    "$ref": "#/$defs/opt_buffer"
                  },
                  "weekdays": {
                    "$ref": "#/$defs/opt_weekdays"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "welcome"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "kicker": {
                    "$ref": "#/$defs/opt_kicker"
                  },
                  "text": {
                    "$ref": "#/$defs/opt_text"
                  },
                  "sub": {
                    "$ref": "#/$defs/opt_sub"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  },
                  "source": {
                    "$ref": "#/$defs/opt_source"
                  },
                  "times": {
                    "$ref": "#/$defs/opt_times"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "quick"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "quick": {
                    "$ref": "#/$defs/opt_quick"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "wifi"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "guide"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "screentime"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "ask"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "agent"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "$ref": "#/$defs/opt_label"
                  },
                  "align": {
                    "$ref": "#/$defs/opt_align"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "stack"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "type": "object",
            "properties": {
              "opts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        }
      ]
    },
    "opt_align": {
      "enum": [
        "left",
        "center",
        "right"
      ]
    },
    "opt_alt": {
      "type": "boolean"
    },
    "opt_ampm": {
      "type": "boolean"
    },
    "opt_anchor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "opt_apps": {
      "type": "array",
      "maxItems": 16,
      "items": {
        "enum": [
          "netflix",
          "youtube",
          "prime",
          "disney",
          "stan",
          "binge",
          "kayo",
          "iview",
          "sbs",
          "7plus",
          "9now",
          "10play",
          "foxtel",
          "paramount",
          "appletv",
          "max",
          "spotify",
          "youtubemusic",
          "googletv",
          "twitch",
          "plex",
          "audible",
          "moonlight",
          "optussport",
          "britbox",
          "docplay",
          "hayu",
          "kanopy",
          "beamafilm",
          "abclisten",
          "abcnews",
          "skynewsau",
          "fetch",
          "stansport",
          "abckids",
          "hotstar",
          "jiocinema",
          "sonyliv",
          "zee5",
          "mxplayer",
          "hoichoi",
          "aha",
          "sunnxt",
          "erosnow",
          "altt",
          "airtelxstream",
          "tataplaybinge",
          "lionsgateplay",
          "shemaroome",
          "etvwin",
          "chaupal",
          "discoveryplusin",
          "waves",
          "fancode",
          "jiosaavn",
          "gaana",
          "wynk",
          "aajtak",
          "ndtv",
          "hungama",
          "tubi",
          "plutotv",
          "crunchyroll",
          "mubi",
          "shudder",
          "curiosity",
          "dailymotion",
          "hulu",
          "peacock",
          "youtubetv",
          "sling",
          "fubo",
          "philo",
          "starz",
          "mgmplus",
          "amcplus",
          "fandango",
          "rokuchannel",
          "espn",
          "nba",
          "f1tv",
          "cnn",
          "bloomberg",
          "pbskids",
          "pandora",
          "iheart",
          "iplayer",
          "itvx",
          "channel4",
          "my5",
          "nowuk",
          "bbcnews",
          "dazn",
          "raiplay",
          "now",
          "vtmgo",
          "vrtmax",
          "youtubekids",
          "applemusic",
          "amazonmusic",
          "tidal",
          "deezer",
          "tunein",
          "soundcloud",
          "xbox",
          "geforcenow",
          "steamlink",
          "retroarch",
          "kodi",
          "vlc",
          "jellyfin",
          "stremio",
          "nuvio"
        ]
      },
      "description": "Apps by couch-tv catalogue id (never a package name): each TV opens the app it has under that id. A dock or folder shows up to 12, an app grid 16. Leave it out to show every app the TV has."
    },
    "opt_arrive_h": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23
    },
    "opt_arrive_m": {
      "type": "integer",
      "minimum": 0,
      "maximum": 59
    },
    "opt_bin_a": {
      "type": "string",
      "maxLength": 20,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_bin_b": {
      "type": "string",
      "maxLength": 20,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_buffer": {
      "type": "integer",
      "minimum": 0,
      "maximum": 60
    },
    "opt_cam": {
      "type": "string",
      "maxLength": 80,
      "pattern": "^camera\\.[a-z0-9_]{1,64}$",
      "description": "A Home Assistant camera entity id. A TV shows it only when its own config.json names it too."
    },
    "opt_caption": {
      "type": "string",
      "maxLength": 60,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_cities": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "type": "string",
        "pattern": "^[A-Z][A-Za-z_]{1,30}(/[A-Z][A-Za-z_-]{1,30}){1,2}$"
      },
      "description": "Time zones by IANA name, such as Australia/Sydney."
    },
    "opt_cols": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6
    },
    "opt_controls": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "icon"
        ],
        "properties": {
          "icon": {
            "enum": [
              "light",
              "lamp",
              "pendant",
              "blinds",
              "lock",
              "outlet",
              "speaker",
              "shield",
              "fan",
              "aircon",
              "tv",
              "camera",
              "garage",
              "light-off"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
            "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
          }
        }
      }
    },
    "opt_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8
    },
    "opt_date": {
      "type": "boolean"
    },
    "opt_day": {
      "type": "integer",
      "minimum": 1,
      "maximum": 31
    },
    "opt_dfmt": {
      "enum": [
        "short",
        "numeric",
        "weekday",
        "day_month",
        "full"
      ]
    },
    "opt_entity": {
      "type": "string",
      "pattern": "^climate\\.[a-z0-9_]{1,64}$",
      "description": "A Home Assistant climate entity id."
    },
    "opt_feed": {
      "enum": [
        "abc",
        "abc-justin",
        "abc-sport",
        "abc-business",
        "sbs",
        "guardian",
        "bbc",
        "rnz"
      ]
    },
    "opt_fit": {
      "enum": [
        "cover",
        "contain"
      ]
    },
    "opt_format": {
      "enum": [
        "12h",
        "24h"
      ]
    },
    "opt_hilo": {
      "type": "boolean"
    },
    "opt_icon": {
      "type": "string",
      "pattern": "^[a-z][a-z-]{1,23}$",
      "description": "An icon's name from the TV's icon set."
    },
    "opt_image": {
      "enum": [
        "backgrounds/albury-storm.jpg",
        "backgrounds/aresquiers-beach.jpg",
        "backgrounds/grose-valley.jpg",
        "backgrounds/loop-clouds.jpg",
        "backgrounds/loop-fire.jpg",
        "backgrounds/loop-ocean.jpg",
        "backgrounds/loop-rain.jpg",
        "backgrounds/tessellated-pavement.jpg",
        "backgrounds/vang-vieng-sunset.jpg"
      ],
      "description": "One of the TV's own photos."
    },
    "opt_kicker": {
      "type": "string",
      "maxLength": 60,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_label": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_league": {
      "enum": [
        "afl",
        "nrl",
        "aleague",
        "epl",
        "nba",
        "bbl",
        "cricket"
      ]
    },
    "opt_lid_a": {
      "type": "string",
      "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
      "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
    },
    "opt_lid_b": {
      "type": "string",
      "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
      "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
    },
    "opt_mat": {
      "type": "string",
      "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\(\\s*[0-9.\\s,%]+\\))$",
      "description": "A colour: #rgb, #rrggbb, #rrggbbaa, rgb() or rgba()."
    },
    "opt_month": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12
    },
    "opt_more": {
      "type": "boolean"
    },
    "opt_names": {
      "type": "boolean"
    },
    "opt_night": {
      "type": "boolean"
    },
    "opt_place": {
      "type": "boolean"
    },
    "opt_players": {
      "type": "array",
      "maxItems": 6,
      "items": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^media_player\\.[a-z0-9_]{1,64}$"
      },
      "description": "Home Assistant media player entity ids. A TV shows one only when its own config.json names it too."
    },
    "opt_quick": {
      "type": "array",
      "maxItems": 6,
      "items": {
        "enum": [
          "sleep",
          "picture",
          "look",
          "soundscape",
          "screen_off",
          "headphones",
          "input",
          "bluetooth",
          "network",
          "tvsettings",
          "screensaver"
        ]
      }
    },
    "opt_reading": {
      "type": "string",
      "maxLength": 80,
      "pattern": "^sensor\\.[a-z0-9_]{1,64}$",
      "description": "A Home Assistant sensor entity id. A TV shows it only when its own config.json names it too."
    },
    "opt_scene": {
      "enum": [
        "night",
        "fog",
        "golden",
        "dawn",
        "water"
      ]
    },
    "opt_seconds": {
      "type": "boolean"
    },
    "opt_seconds_each": {
      "type": "integer",
      "minimum": 5,
      "maximum": 600
    },
    "opt_show": {
      "enum": [
        "date",
        "weather",
        "both"
      ]
    },
    "opt_shows": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "opt_sound": {
      "enum": [
        "rain",
        "fire",
        "waves",
        "brown"
      ]
    },
    "opt_source": {
      "enum": [
        "typed",
        "calendar"
      ],
      "description": "Where the guest's name comes from: typed words, or the bookings calendar kept on the TV. A design never carries the name."
    },
    "opt_sport": {
      "type": "boolean"
    },
    "opt_sub": {
      "type": "string",
      "maxLength": 80,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_switches": {
      "type": "array",
      "maxItems": 16,
      "items": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^(light|switch|fan|cover)\\.[a-z0-9_]{1,64}$"
      },
      "description": "Home Assistant light, switch, fan or cover entity ids. A TV shows one only when its own config.json names it too."
    },
    "opt_team": {
      "type": "string",
      "maxLength": 24,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_text": {
      "type": "string",
      "maxLength": 120,
      "pattern": "^[A-Za-zÀ-ÖØ-öø-ſ .,'’!?&():;\"\\n-]*$",
      "description": "Words a TV draws: Latin letters (with accents), spaces and . , ' ! ? & ( ) : ; \" -. No digits, no @, no links: a line with any other character is not shown."
    },
    "opt_tickers": {
      "type": "array",
      "maxItems": 6,
      "items": {
        "type": "string",
        "pattern": "^\\s*\\^?[A-Za-z0-9]{1,8}([.=-][A-Za-z0-9]{1,4})?\\s*$"
      },
      "description": "Ticker symbols, such as CBA.AX, ^AXJO or AUDUSD=X."
    },
    "opt_times": {
      "type": "boolean",
      "description": "false hides the check in and check out line."
    },
    "opt_unit": {
      "enum": [
        "sleeps",
        "days",
        "weeks"
      ]
    },
    "opt_weekday": {
      "type": "integer",
      "minimum": 0,
      "maximum": 6
    },
    "opt_weekdays": {
      "type": "boolean"
    }
  }
}
