blob: 83d58a5827776c33a63a2ccdb19278ec6c27e3ec (
plain)
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
|
//
// ~~~ action config types
//
// action "on" actions
export enum ACTION_ON_ACTION {
PRESS = "press"
MOTION = "motion"
}
// action "on" type
export interface ActionOnType {
device: string,
action: ACTION_ON_ACTION
}
// action "if" types
export enum ACTION_IF_TYPE {
ALL = "all"
ANY = "any"
}
// action "if" status
export enum ACTION_IF_STATUS {
ON = "on"
OFF = "off"
TOGGLE = "toggle"
}
// action "if" type
export interface ActionIfType {
device: string,
status: ACTION_IF_STATUS
}
// action "do" actions
export enum ACTION_DO_ACTION {
ON = "on"
OFF = "off"
TOGGLE = "toggle"
}
// action "do" type
export interface ActionDoType {
device: string,
action: ACTION_DO_ACTION
}
// global action config
export default interface ActionsConfig {
name: string,
on: ActionOnType
ifType?: ACTION_IF_TYPE,
if?: ActionIfType,
do: ActionDoType[]
}
|