-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.schema.json
109 lines (109 loc) · 2.99 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"pluginAlias": "HydrawisePlatform",
"pluginType": "platform",
"singular": false,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "Hydrawise",
"required": true
},
"type": {
"title": "Connection Type",
"type": "string",
"default": "LOCAL",
"oneOf": [
{
"title": "Local",
"enum": ["LOCAL"]
},
{
"title": "Cloud",
"enum": ["CLOUD"]
}
],
"description": "Use a local connection where possible. This type of connection suffers no delays and has no rate limit. The cloud connection will only allow 30 requests every 5 min.",
"required": true
},
"api_key": {
"title": "Hydrawise Cloud API key",
"type": "string",
"description": "You can obtain your API key from the 'Account Details' screen on the <a target=\"_blank\" href=\"https://app.hydrawise.com/config/account/details\">Hydrawise platform</a>"
},
"host": {
"title": "Hostname or IP address",
"type": "string"
},
"user": {
"title": "Username",
"type": "string",
"default": "admin",
"description": "The username of your local controller. Should not be configured unless for specific setups. Defaults to 'admin'"
},
"password": {
"title": "Password",
"type": "string"
},
"polling_interval": {
"title": "Polling interval",
"type": "number",
"description": "The amount of ms between each poll to the local controller (default: 1000) or the Hydrawise cloud (default: 12000)",
"minimum": 200
},
"running_time": {
"title": "Running time override",
"type": "number",
"description": "The amount of seconds a zone should run (default: use configured run time on the Hydrawise platform)"
}
}
},
"form": [
"name",
{
"key": "type",
"type": "radiobuttons"
},
{
"ref_name": "Local configuration",
"type": "fieldset",
"items": ["host", "password"],
"condition": {
"functionBody": "return model.type == 'LOCAL'"
}
},
{
"ref_name": "Cloud configuration",
"type": "fieldset",
"items": ["api_key"],
"condition": {
"functionBody": "return model.type == 'CLOUD'"
}
},
{
"type": "fieldset",
"expandable": true,
"title": "Advanced Settings",
"description": "Don't change these, unless you understand what you're doing.",
"items": [
{
"key": "user",
"condition": {
"functionBody": "return model.type == 'LOCAL'"
}
},
{
"key": "running_time"
},
{
"key": "polling_interval",
"validationMessage": {
"101": "Should at least be 200 ms"
}
}
]
}
]
}