-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdevice-config-schema.coffee
86 lines (86 loc) · 2.62 KB
/
device-config-schema.coffee
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
module.exports ={
title: "pimatic-openweather device config schemas"
OpenWeatherDevice: {
title: "OpenWeatherDevice config options"
type: "object"
extensions: ["xLink", "xAttributeOptions"]
properties:
location:
description: "City/country"
type: "string"
cityId:
description: "City ID. If provided, data will queried for the given id instead of using the location property"
type: "string"
required: false
lang:
description: "Language"
type: "string"
default: "en"
units:
description: "Units"
type: "string"
default: "metric"
timeout:
description: "Timeout between requests"
type: "integer"
default: "900000"
timeoutOnError:
description: "Timeout between requests if previous request failed"
type: "integer"
default: "60000"
blacklist:
description: "List of weather results to ignore as they contain false data"
type: "array"
default: []
format: "table"
items:
type: "object"
properties:
base:
description: "Indicates the origin of the weather data, e.g., 'stations' or 'cmc_stations'"
type: "string"
weatherId:
description: "The weather condition id set in the blacklisted result"
type: "integer"
required: false
temperature:
description: "The temperature set in the blacklisted result"
type: "number"
required: false
}
OpenWeatherForecastDevice: {
title: "OpenWeatherForecastDevice config options"
type: "object"
extensions: ["xLink", "xAttributeOptions"]
properties:
location:
description: "City/country"
type: "string"
cityId:
description: "City ID. If provided, data will queried for the given id instead of using the location property"
type: "string"
required: false
lang:
description: "Language"
type: "string"
default: "en"
units:
description: "Units"
type: "string"
default: "metric"
timeout:
description: "Timeout between requests"
type: "integer"
default: "900000"
timeoutOnError:
description: "Timeout between requests if previous request failed"
type: "integer"
default: "60000"
day:
description: "day to retrieve forecast for, from 1 to 16 (1=today, 2=tomorrow, ...)"
type: "integer"
default: 2
minimum: 1
maximum: 16
}
}