@switchbot/homebridge-switchbot 2.8.1-beta.19 → 2.8.1-beta.20
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/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +0 -7
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +0 -5
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +0 -5
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +0 -7
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +0 -5
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts +3 -3
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +184 -161
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +0 -5
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +0 -5
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +0 -5
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +2 -2
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +20 -20
- package/dist/device/meter.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +0 -5
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +0 -5
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +0 -5
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +0 -5
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +0 -5
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +0 -5
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +0 -5
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +0 -5
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +0 -5
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +0 -5
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +0 -5
- package/dist/irdevice/waterheater.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +0 -9
- package/src/device/ceilinglight.ts +0 -6
- package/src/device/colorbulb.ts +0 -6
- package/src/device/contact.ts +0 -8
- package/src/device/curtain.ts +0 -6
- package/src/device/hub.ts +191 -177
- package/src/device/humidifier.ts +0 -6
- package/src/device/lightstrip.ts +0 -6
- package/src/device/lock.ts +0 -6
- package/src/device/meter.ts +22 -23
- package/src/device/motion.ts +0 -6
- package/src/device/plug.ts +0 -6
- package/src/device/robotvacuumcleaner.ts +0 -6
- package/src/irdevice/airconditioner.ts +0 -6
- package/src/irdevice/airpurifier.ts +0 -6
- package/src/irdevice/camera.ts +0 -6
- package/src/irdevice/fan.ts +0 -6
- package/src/irdevice/light.ts +0 -6
- package/src/irdevice/tv.ts +0 -6
- package/src/irdevice/vacuumcleaner.ts +0 -6
- package/src/irdevice/waterheater.ts +0 -6
|
@@ -77,12 +77,6 @@ export class RobotVacuumCleaner {
|
|
|
77
77
|
(this.robotVacuumCleanerService = accessory.getService(this.platform.Service.Lightbulb) || accessory.addService(this.platform.Service.Lightbulb)),
|
|
78
78
|
`${device.deviceName} ${device.deviceType}`;
|
|
79
79
|
|
|
80
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
81
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
82
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Lightbulb, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
83
|
-
|
|
84
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
85
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
86
80
|
this.robotVacuumCleanerService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
87
81
|
if (!this.robotVacuumCleanerService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
88
82
|
this.robotVacuumCleanerService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
|
@@ -71,12 +71,6 @@ export class AirConditioner {
|
|
|
71
71
|
(this.coolerService = accessory.getService(this.platform.Service.HeaterCooler) || accessory.addService(this.platform.Service.HeaterCooler)),
|
|
72
72
|
`${accessory.displayName} ${device.remoteType}`;
|
|
73
73
|
|
|
74
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
75
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
76
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
77
|
-
|
|
78
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
79
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
80
74
|
this.coolerService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
81
75
|
if (!this.coolerService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
82
76
|
this.coolerService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
|
@@ -65,12 +65,6 @@ export class AirPurifier {
|
|
|
65
65
|
(this.airPurifierService = accessory.getService(this.platform.Service.AirPurifier) || accessory.addService(this.platform.Service.AirPurifier)),
|
|
66
66
|
`${accessory.displayName} Air Purifier`;
|
|
67
67
|
|
|
68
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
69
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
70
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
71
|
-
|
|
72
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
73
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
74
68
|
this.airPurifierService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
75
69
|
if (!this.airPurifierService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
76
70
|
this.airPurifierService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -47,12 +47,6 @@ export class Camera {
|
|
|
47
47
|
(this.switchService = accessory.getService(this.platform.Service.Switch) || accessory.addService(this.platform.Service.Switch)),
|
|
48
48
|
`${accessory.displayName} Camera`;
|
|
49
49
|
|
|
50
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
51
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
52
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
53
|
-
|
|
54
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
55
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
56
50
|
this.switchService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
57
51
|
if (!this.switchService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
58
52
|
this.switchService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -54,12 +54,6 @@ export class Fan {
|
|
|
54
54
|
(this.fanService = accessory.getService(this.platform.Service.Fanv2) || accessory.addService(this.platform.Service.Fanv2)),
|
|
55
55
|
`${accessory.displayName} Fan`;
|
|
56
56
|
|
|
57
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
58
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
59
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
60
|
-
|
|
61
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
62
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
63
57
|
this.fanService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
64
58
|
if (!this.fanService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
65
59
|
this.fanService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
package/src/irdevice/light.ts
CHANGED
|
@@ -47,12 +47,6 @@ export class Light {
|
|
|
47
47
|
(this.lightBulbService = accessory.getService(this.platform.Service.Lightbulb) || accessory.addService(this.platform.Service.Lightbulb)),
|
|
48
48
|
`${accessory.displayName} ${device.remoteType}`;
|
|
49
49
|
|
|
50
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
51
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
52
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
53
|
-
|
|
54
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
55
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
56
50
|
this.lightBulbService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
57
51
|
if (!this.lightBulbService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
58
52
|
this.lightBulbService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -78,12 +78,6 @@ export class TV {
|
|
|
78
78
|
`${accessory.displayName} ${device.remoteType}`;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
82
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
83
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
84
|
-
|
|
85
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
86
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
87
81
|
this.tvService.getCharacteristic(this.platform.Characteristic.ConfiguredName);
|
|
88
82
|
|
|
89
83
|
// set sleep discovery characteristic
|
|
@@ -47,12 +47,6 @@ export class VacuumCleaner {
|
|
|
47
47
|
(this.switchService = accessory.getService(this.platform.Service.Switch) || accessory.addService(this.platform.Service.Switch)),
|
|
48
48
|
`${accessory.displayName} ${device.remoteType}`;
|
|
49
49
|
|
|
50
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
51
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
52
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
53
|
-
|
|
54
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
55
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
56
50
|
this.switchService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
57
51
|
if (!this.switchService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
58
52
|
this.switchService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|
|
@@ -47,12 +47,6 @@ export class WaterHeater {
|
|
|
47
47
|
(this.valveService = accessory.getService(this.platform.Service.Valve) || accessory.addService(this.platform.Service.Valve)),
|
|
48
48
|
`${accessory.displayName} ${device.remoteType}`;
|
|
49
49
|
|
|
50
|
-
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
51
|
-
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
52
|
-
// accessory.getService('NAME') ?? accessory.addService(this.platform.Service.Outlet, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
53
|
-
|
|
54
|
-
// set the service name, this is what is displayed as the default name on the Home app
|
|
55
|
-
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
56
50
|
this.valveService.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
|
|
57
51
|
if (!this.valveService.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
58
52
|
this.valveService.addCharacteristic(this.platform.Characteristic.ConfiguredName, accessory.displayName);
|