{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fibaro Home Center Light Sensor JSON Schema",
    "name": "light_sensor",
    "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": [
                "light_sensor"
            ]
        },
        "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"
                },
                "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"
                },
                "saveLogs": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "showChildren": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "smsNotificationID": {
                    "type": "string"
                },
                "smsNotificationType": {
                    "type": "string"
                },
                "sortOrder": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "useTemplate": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "userDescription": {
                    "type": "string"
                },
                "value": {
                    "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",
                "log",
                "logTemp",
                "needConfigure",
                "nodeID",
                "parametersTemplate",
                "parentID",
                "pollingRetryError",
                "pollingTime",
                "pollingTimeNext",
                "pollingTimeSec",
                "productInfo",
                "pushNotificationID",
                "pushNotificationType",
                "saveLogs",
                "showChildren",
                "smsNotificationID",
                "smsNotificationType",
                "sortOrder",
                "unit",
                "useTemplate",
                "userDescription",
                "value",
                "zwaveCompany",
                "zwaveInfo",
                "zwaveVersion"
            ],
            "additionalProperties": false
        },
        "actions": {
            "type": "object",
            "properties": {},
            "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
}