{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fibaro Home Center Motion Sensor JSON Schema",
    "name": "water_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": [
                "water_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"
                },
                "alarmDelay": {
                    "type": "string"
                },
                "alarmExclude": {
                    "type": "string"
                },
                "alarmTimeTimestamp": {
                    "type": "string"
                },
                "armConditions": {
                    "type": "string"
                },
                "armConfig": {
                    "type": "string"
                },
                "armDelay": {
                    "type": "string"
                },
                "armError": {
                    "type": "string"
                },
                "armTimeTimestamp": {
                    "type": "string"
                },
                "armed": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "batteryLevel": {
                    "type": "string"
                },
                "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"
                },
                "fibaroAlarm": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "isBatteryOperated": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "lastBreached": {
                    "type": "string"
                },
                "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"
                    ]
                },
                "sceneActivation": {
                    "type": "string"
                },
                "sceneDimingDuration": {
                    "type": "string"
                },
                "sensorSupport": {
                    "type": "string"
                },
                "showChildren": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "smsNotificationID": {
                    "type": "string"
                },
                "smsNotificationType": {
                    "type": "string"
                },
                "sortOrder": {
                    "type": "string"
                },
                "tamperAlarm": {
                    "type": "string"
                },
                "tamperNotificationID": {
                    "type": "string"
                },
                "tamperNotificationType": {
                    "type": "string"
                },
                "tamperState": {
                    "type": "string"
                },
                "tamperTimestamp": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "unitSensor": {
                    "type": "string"
                },
                "useTemplate": {
                    "enum": [
                        "0",
                        "1"
                    ]
                },
                "userDescription": {
                    "type": "string"
                },
                "value": {
                    "type": "string"
                },
                "valueSensor": {
                    "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",
                "alarmExclude",
                "alarmTimeTimestamp",
                "armConditions",
                "armConfig",
                "armError",
                "armTimeTimestamp",
                "armed",
                "classConfigure",
                "classGeneric",
                "classSupport",
                "classVersion",
                "dead",
                "deviceControlType",
                "deviceIcon",
                "disabled",
                "emailNotificationID",
                "emailNotificationType",
                "endPoint",
                "fibaroAlarm",
                "isBatteryOperated",
                "lastBreached",
                "log",
                "logTemp",
                "needConfigure",
                "parametersTemplate",
                "parentID",
                "pollingRetryError",
                "pollingTime",
                "pollingTimeNext",
                "pollingTimeSec",
                "productInfo",
                "pushNotificationID",
                "pushNotificationType",
                "requestNodeNeighborState",
                "requestNodeNeighborStateTimeStemp",
                "saveLogs",
                "showChildren",
                "smsNotificationID",
                "smsNotificationType",
                "sortOrder",
                "tamperAlarm",
                "tamperNotificationID",
                "tamperNotificationType",
                "tamperState",
                "tamperTimestamp",
                "unit",
                "useTemplate",
                "userDescription",
                "value",
                "zwaveCompany",
                "zwaveInfo",
                "zwaveVersion"
            ],
            "additionalProperties": false
        },
        "actions": {
            "type": "object",
            "properties": {
                "armed": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "firmwareUpdate": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "pollingTimeSec": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                },
                "requestNodeNeighborUpdate": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 0
                },
                "wakeUpTime": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                }
            },
            "required": [
                "armed",
                "pollingTimeSec",
                "requestNodeNeighborUpdate"
            ],
            "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
}