Skip to content

Commit 923120c

Browse files
committed
Fix typo replacing tabs for spaces
1 parent ec68246 commit 923120c

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

index.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,24 @@ VirtualSwitch.prototype.init = function (config) {
4646
//level = "off";
4747
}
4848

49-
var defaults = {
50-
metrics: {
51-
title: self.getInstanceTitle(),
52-
icon: icon,
49+
var defaults = {
50+
metrics: {
51+
title: self.getInstanceTitle(),
52+
icon: icon,
5353
level: level
54-
}
55-
};
54+
}
55+
};
5656

57-
var overlay = {
58-
deviceType: deviceType,
59-
probeType: probeType
60-
};
57+
var overlay = {
58+
deviceType: deviceType,
59+
probeType: probeType
60+
};
6161

62-
this.vDev = this.controller.devices.create({
63-
deviceId: this.getName() + "_" + this.id,
64-
defaults: defaults,
65-
overlay: overlay,
66-
handler: function(command, args) {
62+
this.vDev = this.controller.devices.create({
63+
deviceId: this.getName() + "_" + this.id,
64+
defaults: defaults,
65+
overlay: overlay,
66+
handler: function(command, args) {
6767

6868
// Get device type to support on/open and off/close
6969
var vDevType = deviceType;
@@ -73,7 +73,7 @@ VirtualSwitch.prototype.init = function (config) {
7373

7474
if (command === 'update') {
7575
// Do nothing
76-
}
76+
}
7777
else if ((command === "on") || (command === "open")) {
7878
console.log("Virtual Switch: '" + deviceName + "' command: 'on/open' ");
7979
self.controller.devices.get(self.config.toggleDeviceOn).performCommand("on");
@@ -98,15 +98,15 @@ VirtualSwitch.prototype.init = function (config) {
9898
}
9999
},
100100

101-
moduleId: this.id
102-
});
101+
moduleId: this.id
102+
});
103103
};
104104

105105
VirtualSwitch.prototype.stop = function () {
106-
if (this.vDev) {
107-
this.controller.devices.remove(this.vDev.id);
108-
this.vDev = null;
109-
}
106+
if (this.vDev) {
107+
this.controller.devices.remove(this.vDev.id);
108+
this.vDev = null;
109+
}
110110

111111
VirtualSwitch.super_.prototype.stop.call(this);
112112
};

module.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"type": "object",
2424
"properties": {
2525
"deviceType" : {
26-
"type": "string",
27-
"enum": ["Binary Switch", "Door Lock"],
28-
"required": true
26+
"type": "string",
27+
"enum": ["Binary Switch", "Door Lock"],
28+
"required": true
2929
},
3030
"toggleDeviceOn": {
3131
"field": "enum",
@@ -43,10 +43,10 @@
4343
},
4444
"options": {
4545
"fields": {
46-
"deviceType": {
46+
"deviceType": {
4747
"label": "__m_type__",
48-
"type": "select"
49-
},
48+
"type": "select"
49+
},
5050
"toggleDeviceOn": {
5151
"fieldClass": "toggleDeviceOn",
5252
"label": "__m_toggle_on__",

0 commit comments

Comments
 (0)