-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdevice-config-schema.coffee
58 lines (58 loc) · 1.61 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
module.exports ={
title: "pimatic-gpio device config schemas"
GpioSwitch: {
title: "GpioSwitch config options"
type: "object"
extensions: ["xConfirm", "xLink", "xOnLabel", "xOffLabel"]
properties:
gpio:
description: "The GPIO pin"
type: "number"
inverted:
description: "active low?"
type: "boolean"
default: false
defaultState:
description: "State to set on startup, if not given, last state will be restored"
type: "boolean"
required: false
debounceTimeout:
description: "Optional timeout in ms to software debounce the switch"
type: "number"
required: false
}
GpioContact: {
title: "GpioContact config options"
type: "object"
extensions: ["xLink", "xOpenedLabel", "xClosedLabel"]
properties:
gpio:
description: "The GPIO pin"
type: "number"
inverted:
description: "LOW = closed?"
type: "boolean"
default: false
debounceTimeout:
description: "Optional timeout in ms to software debounce the switch"
type: "number"
required: false
}
GpioPresence: {
title: "GpioPresence config options"
type: "object"
extensions: ["xLink", "xPresentLabel", "xAbsentLabel"]
properties:
gpio:
description: "The GPIO pin"
type: "number"
inverted:
description: "LOW = present?"
type: "boolean"
default: false
debounceTimeout:
description: "Optional timeout in ms to software debounce the switch"
type: "number"
required: false
}
}