forked from chasenicholl/homebridge-weatherflow-tempest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
213 lines (211 loc) · 8.98 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"pluginAlias": "WeatherFlowTempest",
"pluginType": "platform",
"singular": false,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true,
"default": "WeatherFlow Tempest Platform"
},
"local_api": {
"title": "Use Local API",
"type": "boolean",
"required": true,
"default": true
},
"local_api_shared": {
"title": "Share the Local API UDP port with other processes",
"type": "boolean",
"required": false,
"default": false
},
"token": {
"title": "Token",
"type": "string",
"default": "<Your API Token>",
"condition": {
"functionBody": "if (model.local_api != undefined && !model.local_api) { return true; } else { return false; };"
}
},
"station_id": {
"title": "Station ID (Integer of 5 digits)",
"type": "number",
"default": 0
},
"interval": {
"title": "Interval (seconds)",
"type": "integer",
"default": 10,
"minimum": 1,
"condition": {
"functionBody": "if (model.local_api != undefined && !model.local_api) { return true; } else { return false; };"
}
},
"units": {
"title": "Units",
"type": "string",
"enum": [
"Standard",
"Metric"
],
"default": "Standard"
},
"sensors": {
"title": "Weather Sensors",
"description": "Enable WeatherFlow Tempest Sensors.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true
},
"sensor_type": {
"type": "string",
"enum": [
"Temperature Sensor",
"Light Sensor",
"Humidity Sensor",
"Fan",
"Motion Sensor",
"Occupancy Sensor"
],
"default": "Temperature Sensor"
},
"fan_properties": {
"title": "Fan Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Fan') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"wind_avg"
]
}
}
},
"light_properties": {
"title": "Light Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Light Sensor') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"brightness"
]
}
}
},
"humidity_properties": {
"title": "Humidity Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Humidity Sensor') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"relative_humidity"
]
}
}
},
"temperature_properties": {
"title": "Temperature Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Temperature Sensor') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"air_temperature",
"dew_point",
"feels_like",
"wind_chill"
]
}
}
},
"motion_properties": {
"title": "Motion Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Motion Sensor') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"wind_gust"
]
},
"trigger_value": {
"type": "number",
"minimum": 1,
"description": "At what point (value) to trigger motion detected on/off (1 minimum)."
}
}
},
"occupancy_properties": {
"title": "Occupancy Properties",
"type": "object",
"condition": {
"functionBody": "if (model.sensors[arrayIndices] && model.sensors[arrayIndices].sensor_type && model.sensors[arrayIndices].sensor_type === 'Occupancy Sensor') { return true; } else { return false; };"
},
"properties": {
"value_key": {
"type": "string",
"enum": [
"barometric_pressure",
"precip",
"precip_accum_local_day",
"wind_direction",
"wind_gust",
"solar_radiation",
"uv"
],
"description": "Note: `precip_accum_local_day` not supported when using Local API."
},
"trigger_value": {
"type": "number",
"minimum": 0,
"description": "At what point (value) to trigger occupancy detected on/off (0 minimum)."
}
}
}
}
},
"required": [
"name",
"sensor_type",
"value_key"
]
}
},
"required": ["local_api"],
"dependencies": {
"local_api": {
"not": {
"type": "boolean",
"const": true
},
"required": ["token", "station_id"]
}
}
}
}