forked from nVuln/homebridge-lg-thinq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
181 lines (181 loc) · 4.2 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
{
"pluginAlias": "LGThinQ",
"pluginType": "platform",
"singular": true,
"customUi": true,
"schema": {
"auth_mode": {
"title": "Auth Mode",
"type": "string",
"default": "account",
"oneOf": [
{ "title": "LG Account", "enum": ["account"] },
{ "title": "Token", "enum": ["token"] }
]
},
"username": {
"title": "Username",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'account';"
}
},
"password": {
"title": "Password",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'account';"
}
},
"refresh_token": {
"title": "Refresh Token",
"type": "string",
"condition": {
"functionBody": "return model.auth_mode === 'token';"
}
},
"country": {
"title": "Country",
"type": "string",
"default": "US",
"required": true
},
"language": {
"title": "Language",
"type": "string",
"default": "en-US",
"required": true
},
"refresh_interval": {
"title": "Refresh interval (in second)",
"type": "number",
"default": 60,
"required": false
},
"thinq1": {
"title": "Enable ThinQ1 Support?",
"type": "boolean",
"default": false
},
"devices": {
"title": "Devices",
"description": "leave it empty to enable all device",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"title": "Device ID",
"type": "string",
"required": true
},
"name": {
"title": "Device Name",
"type": "string"
},
"type": {
"title": "Device Type",
"type": "string",
"enum": [
"AC",
"WASHER",
"WASHER_NEW",
"WASH_TOWER",
"DRYER",
"REFRIGERATOR",
"DISHWASHER",
"AIR_PURIFIER",
"DEHUMIDIFIER"
],
"condition": {
"functionBody": "return false;"
}
},
"washer_trigger": {
"title": "Enable washer program finished trigger?",
"type": "boolean",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['WASHER','WASHER_NEW', 'WASH_TOWER'].includes(model.devices[arrayIndices].type);"
}
},
"ac_air_quality": {
"title": "Enable Air Quality",
"description": "if your device supported Air Quality sensor",
"type": "boolean",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
"ac_mode": {
"title": "AC Mode (Heating or Cooling or Both)",
"type": "string",
"default": "BOTH",
"oneOf": [
{
"title": "Both Heating and Cooling mode",
"enum": ["BOTH"]
},
{
"title": "Cooling mode only",
"enum": ["COOLING"]
},
{
"title": "Heating mode only",
"enum": ["HEATING"]
}
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
"ac_swing_mode": {
"title": "Swing Mode (vertical or horizontal)",
"type": "string",
"default": "BOTH",
"oneOf": [
{
"title": "Both vertical and horizontal swing",
"enum": ["BOTH"]
},
{
"title": "Vertical swing only",
"enum": ["VERTICAL"]
},
{
"title": "Horizontal swing only",
"enum": ["HORIZONTAL"]
}
],
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
"ac_temperature_sensor": {
"title": "Current temperature as sensor",
"type": "boolean",
"default": false,
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
"ac_led_control": {
"title": "Enable led panel control",
"type": "boolean",
"default": false,
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
},
"ac_fan_control": {
"title": "Enable separate fan control",
"type": "boolean",
"default": false,
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices] && ['AC'].includes(model.devices[arrayIndices].type);"
}
}
}
}
}
}
}