Skip to content

Commit 55c2016

Browse files
committed
v1.1.8 added Air Fresh VA4 and Aqara D1 Wirelles Switches
1 parent 688efe9 commit 55c2016

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

drivers/ctrl_ln2.aq1/driver.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@ const model = ["ctrl_ln2.aq1", "switch_b2nacn02"];
44
const initToggleFlowTriggers = (on, off, toggle) => ({
55
on: new Homey.FlowCardTriggerDevice(on).register(),
66
off: new Homey.FlowCardTriggerDevice(off).register(),
7-
toggle: new Homey.FlowCardTriggerDevice(toggle).register()
7+
toggle: new Homey.FlowCardTriggerDevice(toggle).register(),
88
});
99

10-
const initFlowCondition = name => new Homey.FlowCardCondition(name).register();
10+
const initFlowCondition = (name) => new Homey.FlowCardCondition(name).register();
1111

1212
const initToggleFlowAction = (on, off) => ({
1313
on: new Homey.FlowCardAction(on).register(),
14-
off: new Homey.FlowCardAction(off).register()
14+
off: new Homey.FlowCardAction(off).register(),
1515
});
1616

1717
class DoubleSwitchLN extends Homey.Driver {
1818
onInit() {
1919
this.triggers = {
2020
left_switch: initToggleFlowTriggers("left_switch_on", "left_switch_off", "left_switch_toggle"),
21-
right_switch: initToggleFlowTriggers("right_switch_on", "right_switch_off", "right_switch_toggle")
21+
right_switch: initToggleFlowTriggers("right_switch_on", "right_switch_off", "right_switch_toggle"),
2222
};
2323
this.conditions = {
2424
left_switch: initFlowCondition("left_switch_active"),
25-
right_switch: initFlowCondition("right_switch_active")
25+
right_switch: initFlowCondition("right_switch_active"),
2626
};
2727
this.actions = {
2828
left_switch: initToggleFlowAction("left_switch_on", "left_switch_off"),
29-
right_switch: initToggleFlowAction("right_switch_on", "right_switch_off")
29+
right_switch: initToggleFlowAction("right_switch_on", "right_switch_off"),
3030
};
3131
}
3232

3333
onPairListDevices(data, callback) {
3434
if (Homey.app.mihub.hubs) {
3535
Homey.app.mihub
3636
.getDevicesByModel(model)
37-
.then(devices =>
37+
.then((devices) =>
3838
callback(
3939
null,
40-
devices.map(device => {
40+
devices.map((device) => {
4141
return {
4242
name: device.name + " | " + device.sid,
4343
data: {
44-
sid: device.sid
45-
}
44+
sid: device.sid,
45+
},
4646
};
4747
})
4848
)

drivers/db86_switch_advanced/driver.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Homey = require("homey");
2-
const model = ["remote.b286acn01"];
2+
const model = ["remote.b286acn01", "lumi.remote.b286acn02", "remote.b286acn02"];
33

44
class DoubleButton86SwitchAdvanced extends Homey.Driver {
55
onInit() {
@@ -10,23 +10,23 @@ class DoubleButton86SwitchAdvanced extends Homey.Driver {
1010
right_click: new Homey.FlowCardTriggerDevice("right_click_button_switch").register(),
1111
right_double_click: new Homey.FlowCardTriggerDevice("right_double_click_click_button_switch").register(),
1212
right_long_click_press: new Homey.FlowCardTriggerDevice("right_long_click_press_click_button_switch").register(),
13-
both_click: new Homey.FlowCardTriggerDevice("both_click_click_press_click_button_switch").register()
13+
both_click: new Homey.FlowCardTriggerDevice("both_click_click_press_click_button_switch").register(),
1414
};
1515
}
1616

1717
onPairListDevices(data, callback) {
1818
if (Homey.app.mihub.hubs) {
1919
Homey.app.mihub
2020
.getDevicesByModel(model)
21-
.then(devices =>
21+
.then((devices) =>
2222
callback(
2323
null,
24-
devices.map(device => {
24+
devices.map((device) => {
2525
return {
2626
name: device.name + " | " + device.sid,
2727
data: {
28-
sid: device.sid
29-
}
28+
sid: device.sid,
29+
},
3030
};
3131
})
3232
)

drivers/sb86_switch/driver.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
const Homey = require("homey");
2-
const model = ["86sw1"];
2+
const model = ["86sw1", "lumi.remote.b186acn02", "remote.b186acn02"];
33

44
class DoubleButton86Switch extends Homey.Driver {
55
onInit() {
66
this.triggers = {
7-
click: new Homey.FlowCardTriggerDevice("click_sb86_switch").register()
7+
click: new Homey.FlowCardTriggerDevice("click_sb86_switch").register(),
88
};
99
}
1010

1111
onPairListDevices(data, callback) {
1212
if (Homey.app.mihub.hubs) {
1313
Homey.app.mihub
1414
.getDevicesByModel(model)
15-
.then(devices =>
15+
.then((devices) =>
1616
callback(
1717
null,
18-
devices.map(device => {
18+
devices.map((device) => {
1919
return {
2020
name: device.name + " | " + device.sid,
2121
data: {
22-
sid: device.sid
23-
}
22+
sid: device.sid,
23+
},
2424
};
2525
})
2626
)

node_modules/mimorelinks/libs/DeviceParser.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)