{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fibaro Home Center Binary Light JSON Schema",
    "name": "thermostat_setpoint",
    "type": "object",
    "properties": {
        "id": {
            "description": "Fibaro Home Center device ID",
            "type": "integer",
            "minimum": 2
        },
        "name": {
            "description": "Device name",
            "type": "string",
            "maxLength": 20
        },
        "roomID": {
            "description": "Room ID defined in Home Center GUI",
            "type": "integer",
            "minimum": 0
        },
        "type": {
            "description": "Zwave device type",
            "enum": [
                "thermostat_setpoint"
            ]
        },
        "remoteGatewayId": {
            "description": "Remote Gateway ID",
            "type": "integer",
            "minimum": 0
        },
        "remoteDeviceID": {
            "description": "Remote Device ID",
            "type": "integer",
            "minimum": 0
        },
        "properties": {
            "type": "object",
            "properties": {
                "UIMessageSendTime": {
                    "type": "string"
                },
                "batteryLevel": {
                    "type": "string",
                    "format": "^[0-9]([0-9]){1}"
                },
                "batteryLowNotification": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "classConfigure": {
                    "type": "string"
                },
                "classGeneric": {
                    "type": "string"
                },
                "classSupport": {
                    "type": "string"
                },
                "classVersion": {
                    "type": "string"
                },
                "dead": {
                    "type": "string"
                },
                "deviceControlType": {
                    "type": "string"
                },
                "deviceIcon": {
                    "type": "string"
                },
                "disabled": {
                    "type": "string"
                },
                "emailNotificationID": {
                    "type": "string"
                },
                "emailNotificationType": {
                    "type": "string"
                },
                "endPoint": {
                    "type": "string"
                },
                "isBatteryOperated": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "log": {
                    "type": "string"
                },
                "logTemp": {
                    "type": "string"
                },
                "needConfigure": {
                    "type": "string"
                },
                "nodeID": {
                    "type": "string"
                },
                "parametersTemplate": {
                    "type": "string"
                },
                "parentID": {
                    "type": "string"
                },
                "pollingRetryError": {
                    "type": "string"
                },
                "pollingTime": {
                    "type": "string"
                },
                "pollingTimeNext": {
                    "type": "string"
                },
                "pollingTimeSec": {
                    "type": "string"
                },
                "productInfo": {
                    "type": "string"
                },
                "pushNotificationID": {
                    "type": "string"
                },
                "pushNotificationType": {
                    "type": "string"
                },
                "requestNodeNeighborState": {
                    "type": "string"
                },
                "requestNodeNeighborStateTimeStemp": {
                    "type": "string"
                },
                "saveLogs": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "showChildren": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "smsNotificationID": {
                    "type": "string"
                },
                "smsNotificationType": {
                    "type": "string"
                },
                "sortOrder": {
                    "type": "string"
                },
                "targetLevel": {
                    "type": "string"
                },
                "dupa": {
                    "enum": [
                        "dupa"
                    ]
                },
                "timeStamp": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "useTemplate": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "userDescription": {
                    "type": "string"
                },
                "value": {
                    "type": "string"
                },
                "wakeUpTime": {
                    "type": "string"
                },
                "zwaveCompany": {
                    "type": "string"
                },
                "zwaveInfo": {
                    "type": "string"
                },
                "zwaveVersion": {
                    "type": "string"
                },
                "parameters": {
                    "type": "array",
                    "minItems": 0,
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "number"
                            },
                            "size": {
                                "type": "number"
                            },
                            "value": {
                                "type": "number"
                            },
                            "lastSetValue": {
                                "type": "number"
                            }
                        }
                    },
                    "_uniqueItems": false
                },
                "associationView": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                        "$ref": "#/definitions/associationItem"
                    }
                },
                "associationSet": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                        "$ref": "#/definitions/associationItem"
                    }
                }
            },
            "required": [
                "UIMessageSendTime",
                "batteryLevel",
                "batteryLowNotification",
                "classConfigure",
                "classGeneric",
                "classSupport",
                "classVersion",
                "dead",
                "deviceControlType",
                "deviceIcon",
                "disabled",
                "emailNotificationID",
                "emailNotificationType",
                "endPoint",
                "isBatteryOperated",
                "log",
                "logTemp",
                "needConfigure",
                "parametersTemplate",
                "parentID",
                "pollingRetryError",
                "pollingTime",
                "pollingTimeNext",
                "pollingTimeSec",
                "productInfo",
                "pushNotificationID",
                "pushNotificationType",
                "requestNodeNeighborState",
                "requestNodeNeighborStateTimeStemp",
                "saveLogs",
                "showChildren",
                "smsNotificationID",
                "smsNotificationType",
                "sortOrder",
                "targetLevel",
                "timeStamp",
                "unit",
                "useTemplate",
                "userDescription",
                "value",
                "wakeUpTime",
                "zwaveCompany",
                "zwaveInfo",
                "zwaveVersion"
            ],
            "additionalProperties": false
        },
        "actions": {
            "type": "object",
            "properties": {
                "pollingTimeSec": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "requestNodeNeighborUpdate": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "setTargetLevel": {
                    "description": "Known issue http://bugzilla.fibaro.com/view.php?id=1125",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1
                },
                "setTime": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "turnOff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "turnOn": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "wakeUpTime": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                }
            },
            "required": [
                "pollingTimeSec",
                "requestNodeNeighborUpdate",
                "turnOff",
                "turnOn"
            ],
            "additionalProperties": false
        },
        "created": {
            "type": "number"
        },
        "modified": {
            "type": "number"
        },
        "sortOrder": {
            "type": "number"
        }
    },
    "definitions": {
        "associationItem": {
            "properties": {
                "groupID": {
                    "type": "number"
                },
                "devices": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 254,
                    "items": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 254
                    }
                }
            }
        }
    },
    "additionalProperties": false
}