{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fibaro Home Center Dimmer JSON Schema",
    "name": "dimmable_light",
    "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": [
                "dimmable_light"
            ]
        },
        "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"
                },
                "buttonType": {
                    "type": "string"
                },
                "classConfigure": {
                    "type": "string"
                },
                "classGeneric": {
                    "type": "string"
                },
                "classSupport": {
                    "type": "string"
                },
                "classVersion": {
                    "type": "string"
                },
                "color": {
                    "enum": [
                        "white"
                    ]
                },
                "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"
                    ]
                },
                "isLight": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "liliOffCommand": {
                    "type": "string"
                },
                "liliOnCommand": {
                    "type": "string"
                },
                "log": {
                    "type": "string"
                },
                "logTemp": {
                    "type": "string"
                },
                "maxValue": {
                    "type": "string"
                },
                "maxVoltage": {
                    "type": "string"
                },
                "minValue": {
                    "type": "string"
                },
                "minVoltage": {
                    "type": "string"
                },
                "meterSupport": {
                    "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"
                },
                "powerConsumption": {
                    "type": "string"
                },
                "productInfo": {
                    "type": "string"
                },
                "pushNotificationID": {
                    "type": "string"
                },
                "pushNotificationType": {
                    "type": "string"
                },
                "requestNodeNeighborState": {
                    "type": "string"
                },
                "requestNodeNeighborStateTimeStemp": {
                    "type": "string"
                },
                "saveLogs": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "sceneActivation": {
                    "type": "string"
                },
                "sceneDimingDuration": {
                    "type": "string"
                },
                "sensorSupport": {
                    "type": "string"
                },
                "showChildren": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "showEnergy": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "smsNotificationID": {
                    "type": "string"
                },
                "smsNotificationType": {
                    "type": "string"
                },
                "sortOrder": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "unitMeter": {
                    "type": "string"
                },
                "unitSensor": {
                    "type": "string"
                },
                "useTemplate": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "userDescription": {
                    "type": "string"
                },
                "value": {
                    "type": "string"
                },
                "valueMeter": {
                    "type": "string"
                },
                "valueSensor": {
                    "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",
                "classConfigure",
                "classGeneric",
                "classSupport",
                "classVersion",
                "dead",
                "deviceControlType",
                "deviceIcon",
                "disabled",
                "emailNotificationID",
                "emailNotificationType",
                "endPoint",
                "isBatteryOperated",
                "isLight",
                "liliOffCommand",
                "liliOnCommand",
                "log",
                "logTemp",
                "needConfigure",
                "parametersTemplate",
                "parentID",
                "pollingRetryError",
                "pollingTime",
                "pollingTimeNext",
                "pollingTimeSec",
                "productInfo",
                "pushNotificationID",
                "pushNotificationType",
                "requestNodeNeighborState",
                "requestNodeNeighborStateTimeStemp",
                "saveLogs",
                "showChildren",
                "smsNotificationID",
                "smsNotificationType",
                "sortOrder",
                "unit",
                "useTemplate",
                "userDescription",
                "value",
                "zwaveCompany",
                "zwaveInfo",
                "zwaveVersion"
            ],
            "additionalProperties": false
        },
        "actions": {
            "type": "object",
            "properties": {
                "firmwareUpdate": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "pollingTimeSec": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "requestNodeNeighborUpdate": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "setValue": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "turnOff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "turnOn": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                }
            },
            "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
}