@switchbot/homebridge-switchbot 1.2.4-beta.0 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/devices/bots.js +4 -4
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/contact.js +4 -4
- package/dist/devices/contact.js.map +1 -1
- package/dist/devices/curtains.js +4 -4
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.js +2 -2
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/irdevices/airconditioners.js +6 -6
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.js +3 -3
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.js +1 -1
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.js +3 -3
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.js +1 -1
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.js +2 -2
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.js +2 -2
- package/dist/irdevices/tvs.js.map +1 -1
- package/dist/irdevices/vacuumcleaners.js +1 -1
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.js +1 -1
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/package.json +66 -66
- package/src/devices/bots.ts +4 -4
- package/src/devices/contact.ts +4 -4
- package/src/devices/curtains.ts +4 -4
- package/src/devices/humidifiers.ts +2 -2
- package/src/irdevices/airconditioners.ts +6 -6
- package/src/irdevices/airpurifiers.ts +3 -3
- package/src/irdevices/cameras.ts +1 -1
- package/src/irdevices/fans.ts +3 -3
- package/src/irdevices/lights.ts +1 -1
- package/src/irdevices/others.ts +2 -2
- package/src/irdevices/tvs.ts +2 -2
- package/src/irdevices/vacuumcleaners.ts +1 -1
- package/src/irdevices/waterheaters.ts +1 -1
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
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
|
-
"publishConfig": {
|
|
35
|
-
"access": "public"
|
|
36
|
-
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
"homebridge-plugin",
|
|
39
|
-
"switchbot",
|
|
40
|
-
"humidifier",
|
|
41
|
-
"humidity",
|
|
42
|
-
"temperature",
|
|
43
|
-
"bot",
|
|
44
|
-
"curtains",
|
|
45
|
-
"windows",
|
|
46
|
-
"ble",
|
|
47
|
-
"ir"
|
|
48
|
-
],
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@homebridge/plugin-ui-utils": "^0.0.19",
|
|
51
|
-
"axios": "^0.24.0",
|
|
52
|
-
"node-switchbot": "^1.1.2",
|
|
53
|
-
"rxjs": "^7.4.0"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@types/node": "^16.11.10",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
58
|
-
"@typescript-eslint/parser": "^5.4.0",
|
|
59
|
-
"eslint": "^8.3.0",
|
|
60
|
-
"homebridge": "^1.3.8",
|
|
61
|
-
"nodemon": "^2.0.15",
|
|
62
|
-
"npm-check-updates": "^12.0.2",
|
|
63
|
-
"rimraf": "^3.0.2",
|
|
64
|
-
"ts-node": "^10.4.0",
|
|
65
|
-
"typescript": "^4.5.2",
|
|
66
|
-
"typescript-axios-wb": "^1.0.3"
|
|
2
|
+
"displayName": "Homebridge SwitchBot",
|
|
3
|
+
"name": "@switchbot/homebridge-switchbot",
|
|
4
|
+
"version": "1.2.4",
|
|
5
|
+
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
|
|
6
|
+
"author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git://github.com/OpenWonderLabs/homebridge-switchbot.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OpenWonderLabs/homebridge-switchbot/issues"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"homebridge": "^1.3.8",
|
|
17
|
+
"node": "^14.18.1 || ^16.13.0"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"check": "npm install && npm outdated",
|
|
22
|
+
"update": "ncu -u && npm update && npm install",
|
|
23
|
+
"lint": "eslint src/**.ts",
|
|
24
|
+
"watch": "npm run build && npm link && nodemon",
|
|
25
|
+
"build": "rimraf ./dist && tsc",
|
|
26
|
+
"prepublishOnly": "npm run lint && npm run build"
|
|
27
|
+
},
|
|
28
|
+
"funding": [
|
|
29
|
+
{
|
|
30
|
+
"type": "Paypal",
|
|
31
|
+
"url": "https://www.paypal.me/donavanbecker"
|
|
67
32
|
}
|
|
68
|
-
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"homebridge-plugin",
|
|
39
|
+
"switchbot",
|
|
40
|
+
"humidifier",
|
|
41
|
+
"humidity",
|
|
42
|
+
"temperature",
|
|
43
|
+
"bot",
|
|
44
|
+
"curtains",
|
|
45
|
+
"windows",
|
|
46
|
+
"ble",
|
|
47
|
+
"ir"
|
|
48
|
+
],
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@homebridge/plugin-ui-utils": "^0.0.19",
|
|
51
|
+
"axios": "^0.24.0",
|
|
52
|
+
"node-switchbot": "^1.1.2",
|
|
53
|
+
"rxjs": "^7.4.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^16.11.10",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
58
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
59
|
+
"eslint": "^8.3.0",
|
|
60
|
+
"homebridge": "^1.3.8",
|
|
61
|
+
"nodemon": "^2.0.15",
|
|
62
|
+
"npm-check-updates": "^12.0.2",
|
|
63
|
+
"rimraf": "^3.0.2",
|
|
64
|
+
"ts-node": "^10.4.0",
|
|
65
|
+
"typescript": "^4.5.2",
|
|
66
|
+
"typescript-axios-wb": "^1.0.3"
|
|
67
|
+
}
|
|
68
|
+
}
|
package/src/devices/bots.ts
CHANGED
|
@@ -444,9 +444,9 @@ export class Bot {
|
|
|
444
444
|
this.platform.debug(`Bot: ${this.accessory.displayName} On: ${this.On}`);
|
|
445
445
|
} else {
|
|
446
446
|
if (this.device.bot?.deviceType === 'switch') {
|
|
447
|
-
this.switchService
|
|
447
|
+
this.switchService?.updateCharacteristic(this.platform.Characteristic.On, this.On);
|
|
448
448
|
} else {
|
|
449
|
-
this.outletService
|
|
449
|
+
this.outletService?.updateCharacteristic(this.platform.Characteristic.On, this.On);
|
|
450
450
|
}
|
|
451
451
|
this.platform.device(`Bot: ${this.accessory.displayName} updateCharacteristic On: ${this.On}`);
|
|
452
452
|
}
|
|
@@ -468,9 +468,9 @@ export class Bot {
|
|
|
468
468
|
|
|
469
469
|
public apiError(e: any) {
|
|
470
470
|
if (this.device.bot?.deviceType === 'switch') {
|
|
471
|
-
this.switchService
|
|
471
|
+
this.switchService?.updateCharacteristic(this.platform.Characteristic.On, e);
|
|
472
472
|
} else {
|
|
473
|
-
this.outletService
|
|
473
|
+
this.outletService?.updateCharacteristic(this.platform.Characteristic.On, e);
|
|
474
474
|
}
|
|
475
475
|
if (this.device.ble) {
|
|
476
476
|
this.batteryService?.updateCharacteristic(this.platform.Characteristic.BatteryLevel, e);
|
package/src/devices/contact.ts
CHANGED
|
@@ -328,7 +328,7 @@ export class Contact {
|
|
|
328
328
|
if (this.MotionDetected === undefined) {
|
|
329
329
|
this.platform.debug(`Contact Sensor: ${this.accessory.displayName} MotionDetected: ${this.MotionDetected}`);
|
|
330
330
|
} else {
|
|
331
|
-
this.motionService
|
|
331
|
+
this.motionService?.updateCharacteristic(this.platform.Characteristic.MotionDetected, this.MotionDetected);
|
|
332
332
|
this.platform.device(`Contact Sensor: ${this.accessory.displayName} updateCharacteristic MotionDetected: ${this.MotionDetected}`);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
@@ -336,7 +336,7 @@ export class Contact {
|
|
|
336
336
|
if (this.CurrentAmbientLightLevel === undefined) {
|
|
337
337
|
this.platform.debug(`Contact Sensor: ${this.accessory.displayName} CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`);
|
|
338
338
|
} else {
|
|
339
|
-
this.lightSensorService
|
|
339
|
+
this.lightSensorService?.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, this.CurrentAmbientLightLevel);
|
|
340
340
|
this.platform.device(`Contact Sensor: ${this.accessory.displayName}`
|
|
341
341
|
+ ` updateCharacteristic CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`);
|
|
342
342
|
}
|
|
@@ -360,10 +360,10 @@ export class Contact {
|
|
|
360
360
|
public apiError(e: any) {
|
|
361
361
|
this.service.updateCharacteristic(this.platform.Characteristic.ContactSensorState, e);
|
|
362
362
|
if (!this.device.contact?.hide_motionsensor) {
|
|
363
|
-
this.motionService
|
|
363
|
+
this.motionService?.updateCharacteristic(this.platform.Characteristic.MotionDetected, e);
|
|
364
364
|
}
|
|
365
365
|
if (!this.device.contact?.hide_lightsensor) {
|
|
366
|
-
this.lightSensorService
|
|
366
|
+
this.lightSensorService?.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, e);
|
|
367
367
|
}
|
|
368
368
|
if (this.device.ble) {
|
|
369
369
|
this.batteryService?.updateCharacteristic(this.platform.Characteristic.BatteryLevel, e);
|
package/src/devices/curtains.ts
CHANGED
|
@@ -573,7 +573,7 @@ export class Curtain {
|
|
|
573
573
|
if (this.CurrentAmbientLightLevel === undefined || Number.isNaN(this.CurrentAmbientLightLevel)) {
|
|
574
574
|
this.platform.debug(`Curtain: ${this.accessory.displayName} CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`);
|
|
575
575
|
} else {
|
|
576
|
-
this.lightSensorService
|
|
576
|
+
this.lightSensorService?.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, this.CurrentAmbientLightLevel);
|
|
577
577
|
this.platform.device(`Curtain: ${this.accessory.displayName}`
|
|
578
578
|
+ ` updateCharacteristic CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`);
|
|
579
579
|
}
|
|
@@ -599,11 +599,11 @@ export class Curtain {
|
|
|
599
599
|
this.service.updateCharacteristic(this.platform.Characteristic.PositionState, e);
|
|
600
600
|
this.service.updateCharacteristic(this.platform.Characteristic.TargetPosition, e);
|
|
601
601
|
if (!this.device.curtain?.hide_lightsensor) {
|
|
602
|
-
this.lightSensorService
|
|
602
|
+
this.lightSensorService?.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, e);
|
|
603
603
|
}
|
|
604
604
|
if (this.device.ble) {
|
|
605
|
-
this.batteryService
|
|
606
|
-
this.batteryService
|
|
605
|
+
this.batteryService?.updateCharacteristic(this.platform.Characteristic.BatteryLevel, e);
|
|
606
|
+
this.batteryService?.updateCharacteristic(this.platform.Characteristic.StatusLowBattery, e);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
|
|
@@ -595,7 +595,7 @@ export class Humidifier {
|
|
|
595
595
|
if (this.CurrentTemperature === undefined) {
|
|
596
596
|
this.platform.debug(`Humidifier: ${this.accessory.displayName} CurrentTemperature: ${this.CurrentTemperature}`);
|
|
597
597
|
} else {
|
|
598
|
-
this.temperatureservice
|
|
598
|
+
this.temperatureservice?.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.CurrentTemperature);
|
|
599
599
|
this.platform.device(`Humidifier: ${this.accessory.displayName} updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
@@ -611,7 +611,7 @@ export class Humidifier {
|
|
|
611
611
|
this.service.updateCharacteristic(this.platform.Characteristic.Active, e);
|
|
612
612
|
this.service.updateCharacteristic(this.platform.Characteristic.RelativeHumidityHumidifierThreshold, e);
|
|
613
613
|
if (!this.device.humidifier?.hide_temperature && !this.device.ble) {
|
|
614
|
-
this.temperatureservice
|
|
614
|
+
this.temperatureservice?.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, e);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
|
|
@@ -168,39 +168,39 @@ export class AirConditioner {
|
|
|
168
168
|
if (this.Active === undefined) {
|
|
169
169
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
170
170
|
} else {
|
|
171
|
-
this.service
|
|
171
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
172
172
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
173
173
|
}
|
|
174
174
|
if (this.RotationSpeed === undefined) {
|
|
175
175
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} RotationSpeed: ${this.RotationSpeed}`);
|
|
176
176
|
} else {
|
|
177
|
-
this.service
|
|
177
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.RotationSpeed, this.RotationSpeed);
|
|
178
178
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName} updateCharacteristic RotationSpeed: ${this.RotationSpeed}`);
|
|
179
179
|
}
|
|
180
180
|
if (this.CurrentTemperature === undefined) {
|
|
181
181
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} CurrentTemperature: ${this.CurrentTemperature}`);
|
|
182
182
|
} else {
|
|
183
|
-
this.service
|
|
183
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.CurrentTemperature);
|
|
184
184
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName} updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`);
|
|
185
185
|
}
|
|
186
186
|
if (this.TargetHeaterCoolerState === undefined) {
|
|
187
187
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} TargetHeaterCoolerState: ${this.TargetHeaterCoolerState}`);
|
|
188
188
|
} else {
|
|
189
|
-
this.service
|
|
189
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.TargetHeaterCoolerState, this.TargetHeaterCoolerState);
|
|
190
190
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName}`
|
|
191
191
|
+ ` updateCharacteristic TargetHeaterCoolerState: ${this.TargetHeaterCoolerState}`);
|
|
192
192
|
}
|
|
193
193
|
if (this.CurrentHeaterCoolerState === undefined) {
|
|
194
194
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} CurrentHeaterCoolerState: ${this.CurrentHeaterCoolerState}`);
|
|
195
195
|
} else {
|
|
196
|
-
this.service
|
|
196
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.CurrentHeaterCoolerState, this.CurrentHeaterCoolerState);
|
|
197
197
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName}`
|
|
198
198
|
+ ` updateCharacteristic CurrentHeaterCoolerState: ${this.CurrentHeaterCoolerState}`);
|
|
199
199
|
}
|
|
200
200
|
if (this.HeatingThresholdTemperature === undefined) {
|
|
201
201
|
this.platform.debug(`Air Conditioner: ${this.accessory.displayName} HeatingThresholdTemperature: ${this.HeatingThresholdTemperature}`);
|
|
202
202
|
} else {
|
|
203
|
-
this.service
|
|
203
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.HeatingThresholdTemperature, this.HeatingThresholdTemperature);
|
|
204
204
|
this.platform.device(`Air Conditioner: ${this.accessory.displayName}`
|
|
205
205
|
+ ` updateCharacteristic HeatingThresholdTemperature: ${this.HeatingThresholdTemperature}`);
|
|
206
206
|
}
|
|
@@ -87,20 +87,20 @@ export class AirPurifier {
|
|
|
87
87
|
if (this.Active === undefined) {
|
|
88
88
|
this.platform.debug(`Air Purifier: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
89
89
|
} else {
|
|
90
|
-
this.service
|
|
90
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
91
91
|
this.platform.device(`Air Purifier: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
92
92
|
}
|
|
93
93
|
if (this.CurrentAirPurifierState === undefined) {
|
|
94
94
|
this.platform.debug(`Air Purifier: ${this.accessory.displayName} CurrentAirPurifierState: ${this.CurrentAirPurifierState}`);
|
|
95
95
|
} else {
|
|
96
|
-
this.service
|
|
96
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.CurrentAirPurifierState, this.CurrentAirPurifierState);
|
|
97
97
|
this.platform.device(`Air Purifier: ${this.accessory.displayName}`
|
|
98
98
|
+ ` updateCharacteristic CurrentAirPurifierState: ${this.CurrentAirPurifierState}`);
|
|
99
99
|
}
|
|
100
100
|
if (this.CurrentHeaterCoolerState === undefined) {
|
|
101
101
|
this.platform.debug(`Air Purifier: ${this.accessory.displayName} CurrentHeaterCoolerState: ${this.CurrentHeaterCoolerState}`);
|
|
102
102
|
} else {
|
|
103
|
-
this.service
|
|
103
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.CurrentHeaterCoolerState, this.CurrentHeaterCoolerState);
|
|
104
104
|
this.platform.device(`Air Purifier: ${this.accessory.displayName}`
|
|
105
105
|
+ ` updateCharacteristic CurrentHeaterCoolerState: ${this.CurrentHeaterCoolerState}`);
|
|
106
106
|
}
|
package/src/irdevices/cameras.ts
CHANGED
|
@@ -63,7 +63,7 @@ export class Camera {
|
|
|
63
63
|
if (this.On === undefined) {
|
|
64
64
|
this.platform.debug(`Camera: ${this.accessory.displayName} On: ${this.On}`);
|
|
65
65
|
} else {
|
|
66
|
-
this.service
|
|
66
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.On, this.On);
|
|
67
67
|
this.platform.device(`Camera: ${this.accessory.displayName} updateCharacteristic On: ${this.On}`);
|
|
68
68
|
}
|
|
69
69
|
}
|
package/src/irdevices/fans.ts
CHANGED
|
@@ -126,19 +126,19 @@ export class Fan {
|
|
|
126
126
|
if (this.Active === undefined) {
|
|
127
127
|
this.platform.debug(`Fan: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
128
128
|
} else {
|
|
129
|
-
this.service
|
|
129
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
130
130
|
this.platform.device(`Fan: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
131
131
|
}
|
|
132
132
|
if (this.SwingMode === undefined) {
|
|
133
133
|
this.platform.debug(`Fan: ${this.accessory.displayName} SwingMode: ${this.SwingMode}`);
|
|
134
134
|
} else {
|
|
135
|
-
this.service
|
|
135
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.SwingMode, this.SwingMode);
|
|
136
136
|
this.platform.device(`Fan: ${this.accessory.displayName} updateCharacteristic SwingMode: ${this.SwingMode}`);
|
|
137
137
|
}
|
|
138
138
|
if (this.RotationSpeed === undefined) {
|
|
139
139
|
this.platform.debug(`Fan: ${this.accessory.displayName} RotationSpeed: ${this.RotationSpeed}`);
|
|
140
140
|
} else {
|
|
141
|
-
this.service
|
|
141
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.RotationSpeed, this.RotationSpeed);
|
|
142
142
|
this.platform.device(`Fan: ${this.accessory.displayName} updateCharacteristic RotationSpeed: ${this.RotationSpeed}`);
|
|
143
143
|
}
|
|
144
144
|
}
|
package/src/irdevices/lights.ts
CHANGED
|
@@ -78,7 +78,7 @@ export class Light {
|
|
|
78
78
|
if (this.On === undefined) {
|
|
79
79
|
this.platform.debug(`Light: ${this.accessory.displayName} On: ${this.On}`);
|
|
80
80
|
} else {
|
|
81
|
-
this.service
|
|
81
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.On, this.On);
|
|
82
82
|
this.platform.device(`Light: ${this.accessory.displayName} updateCharacteristic On: ${this.On}`);
|
|
83
83
|
}
|
|
84
84
|
}
|
package/src/irdevices/others.ts
CHANGED
|
@@ -60,7 +60,7 @@ export class Others {
|
|
|
60
60
|
if (this.Active === undefined) {
|
|
61
61
|
this.platform.debug(`Other: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
62
62
|
} else {
|
|
63
|
-
this.service
|
|
63
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
64
64
|
this.platform.device(`Other: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -175,6 +175,6 @@ export class Others {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
public apiError(e: any) {
|
|
178
|
-
this.service
|
|
178
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, e);
|
|
179
179
|
}
|
|
180
180
|
}
|
package/src/irdevices/tvs.ts
CHANGED
|
@@ -214,13 +214,13 @@ export class TV {
|
|
|
214
214
|
if (this.Active === undefined) {
|
|
215
215
|
this.platform.debug(`${this.device.remoteType}: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
216
216
|
} else {
|
|
217
|
-
this.service
|
|
217
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
218
218
|
this.platform.device(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
219
219
|
}
|
|
220
220
|
if (this.ActiveIdentifier === undefined) {
|
|
221
221
|
this.platform.debug(`${this.device.remoteType}: ${this.accessory.displayName} ActiveIdentifier: ${this.ActiveIdentifier}`);
|
|
222
222
|
} else {
|
|
223
|
-
this.service
|
|
223
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.ActiveIdentifier, this.ActiveIdentifier);
|
|
224
224
|
this.platform.device(`${this.device.remoteType}: ${this.accessory.displayName}`
|
|
225
225
|
+ ` updateCharacteristic ActiveIdentifier: ${this.ActiveIdentifier}`);
|
|
226
226
|
}
|
|
@@ -63,7 +63,7 @@ export class VacuumCleaner {
|
|
|
63
63
|
if (this.On === undefined) {
|
|
64
64
|
this.platform.debug(`Vacuum Cleaner: ${this.accessory.displayName} On: ${this.On}`);
|
|
65
65
|
} else {
|
|
66
|
-
this.service
|
|
66
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.On, this.On);
|
|
67
67
|
this.platform.device(`Vacuum Cleaner: ${this.accessory.displayName} updateCharacteristic On: ${this.On}`);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -77,7 +77,7 @@ export class WaterHeater {
|
|
|
77
77
|
if (this.Active === undefined) {
|
|
78
78
|
this.platform.debug(`Water Heater: ${this.accessory.displayName} Active: ${this.Active}`);
|
|
79
79
|
} else {
|
|
80
|
-
this.service
|
|
80
|
+
this.service?.updateCharacteristic(this.platform.Characteristic.Active, this.Active);
|
|
81
81
|
this.platform.device(`Water Heater: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
|
|
82
82
|
}
|
|
83
83
|
}
|