File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ interface commandDetection {
162
162
function : ( bl : Bluelink ) => Promise < string >
163
163
}
164
164
165
+ // Note order matters in this list, as we check a sentence for presence of words
166
+ // and certain words contain sub-words. Hence "unlock" needs to be before "lock" etc
165
167
const commandMap : commandDetection [ ] = [
166
168
{
167
169
words : [ 'status' , 'remote' ] ,
@@ -183,14 +185,14 @@ const commandMap: commandDetection[] = [
183
185
words : [ 'climate' , 'off' ] ,
184
186
function : climateOff ,
185
187
} ,
186
- {
187
- words : [ 'lock' ] ,
188
- function : lock ,
189
- } ,
190
188
{
191
189
words : [ 'unlock' ] ,
192
190
function : unlock ,
193
191
} ,
192
+ {
193
+ words : [ 'lock' ] ,
194
+ function : lock ,
195
+ } ,
194
196
{
195
197
words : [ 'start' , 'charging' ] ,
196
198
function : startCharge ,
You can’t perform that action at this time.
0 commit comments