From d28af7986567328a39e5dfdda5b0c0f42eef3178 Mon Sep 17 00:00:00 2001 From: Samuel Berwanger Date: Mon, 19 Nov 2018 10:55:54 +0100 Subject: [PATCH] support configuration property schema validation for ThermostatController capabilities --- .../alexa_smart_home_message_schema.json | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/validation_schemas/alexa_smart_home_message_schema.json b/validation_schemas/alexa_smart_home_message_schema.json index edf9d83..85d0322 100644 --- a/validation_schemas/alexa_smart_home_message_schema.json +++ b/validation_schemas/alexa_smart_home_message_schema.json @@ -116,6 +116,15 @@ "NONE" ] }, + "thermostatMode": { + "enum": [ + "AUTO", + "COOL", + "HEAT", + "ECO", + "OFF" + ] + }, "videoCodec": { "enum": [ "H264", @@ -1209,14 +1218,7 @@ ] }, "value": { - "enum": [ - "HEAT", - "COOL", - "AUTO", - "ECO", - "OFF", - "CUSTOM" - ] + "$ref": "#/definitions/common.properties/thermostatMode" }, "timeOfSample": { "$ref": "#/definitions/common.properties/timestamp" @@ -1286,6 +1288,22 @@ "type": "boolean" } } + }, + "configuration": { + "type": "object", + "additionalProperties": false, + "properties": { + "supportsScheduling": { + "type": "boolean" + }, + "supportedModes": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/common.properties/thermostatMode" + } + } + } } } }