@switchbot/homebridge-switchbot 3.5.0-beta.29 → 3.5.0-beta.30
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/contact.js +2 -2
- package/dist/device/contact.js.map +1 -1
- package/dist/device/hub.js +3 -3
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js +1 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +2 -2
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lock.js +1 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +2 -2
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +2 -2
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +1 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/waterdetector.js +1 -1
- package/dist/device/waterdetector.js.map +1 -1
- package/package.json +1 -1
- package/src/device/contact.ts +2 -2
- package/src/device/hub.ts +3 -3
- package/src/device/humidifier.ts +1 -1
- package/src/device/iosensor.ts +2 -2
- package/src/device/lock.ts +1 -1
- package/src/device/meter.ts +2 -2
- package/src/device/meterplus.ts +2 -2
- package/src/device/motion.ts +1 -1
- package/src/device/waterdetector.ts +1 -1
package/src/device/iosensor.ts
CHANGED
|
@@ -77,7 +77,7 @@ export class IOSensor extends deviceBase {
|
|
|
77
77
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Temperature Sensor Service`);
|
|
78
78
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
79
79
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
80
|
-
} else if (!this.TemperatureSensor
|
|
80
|
+
} else if (!this.TemperatureSensor?.Service) {
|
|
81
81
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Temperature Sensor Service`);
|
|
82
82
|
const TemperatureSensorService = `${accessory.displayName} Temperature Sensor`;
|
|
83
83
|
(this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor)
|
|
@@ -105,7 +105,7 @@ export class IOSensor extends deviceBase {
|
|
|
105
105
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Humidity Sensor Service`);
|
|
106
106
|
this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor) as Service;
|
|
107
107
|
accessory.removeService(this.HumiditySensor!.Service);
|
|
108
|
-
} else if (!this.HumiditySensor
|
|
108
|
+
} else if (!this.HumiditySensor?.Service) {
|
|
109
109
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Humidity Sensor Service`);
|
|
110
110
|
const HumiditySensorService = `${accessory.displayName} Humidity Sensor`;
|
|
111
111
|
(this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor)
|
package/src/device/lock.ts
CHANGED
|
@@ -111,7 +111,7 @@ export class Lock extends deviceBase {
|
|
|
111
111
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Contact Sensor Service`);
|
|
112
112
|
this.ContactSensor!.Service = this.accessory.getService(this.hap.Service.ContactSensor) as Service;
|
|
113
113
|
accessory.removeService(this.ContactSensor!.Service);
|
|
114
|
-
} else if (!this.ContactSensor
|
|
114
|
+
} else if (!this.ContactSensor?.Service) {
|
|
115
115
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Contact Sensor Service`);
|
|
116
116
|
const ContactSensorService = `${accessory.displayName} Contact Sensor`;
|
|
117
117
|
(this.ContactSensor!.Service = this.accessory.getService(this.hap.Service.ContactSensor)
|
package/src/device/meter.ts
CHANGED
|
@@ -72,7 +72,7 @@ export class Meter extends deviceBase {
|
|
|
72
72
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Temperature Sensor Service`);
|
|
73
73
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
74
74
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
75
|
-
} else if (!this.TemperatureSensor
|
|
75
|
+
} else if (!this.TemperatureSensor?.Service) {
|
|
76
76
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Temperature Sensor Service`);
|
|
77
77
|
const TemperatureSensorService = `${accessory.displayName} Temperature Sensor`;
|
|
78
78
|
(this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor)
|
|
@@ -100,7 +100,7 @@ export class Meter extends deviceBase {
|
|
|
100
100
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Humidity Sensor Service`);
|
|
101
101
|
this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor) as Service;
|
|
102
102
|
accessory.removeService(this.HumiditySensor!.Service);
|
|
103
|
-
} else if (!this.HumiditySensor
|
|
103
|
+
} else if (!this.HumiditySensor?.Service) {
|
|
104
104
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Humidity Sensor Service`);
|
|
105
105
|
const HumiditySensorService = `${accessory.displayName} Humidity Sensor`;
|
|
106
106
|
(this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor)
|
package/src/device/meterplus.ts
CHANGED
|
@@ -76,7 +76,7 @@ export class MeterPlus extends deviceBase {
|
|
|
76
76
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Temperature Sensor Service`);
|
|
77
77
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
78
78
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
79
|
-
} else if (!this.TemperatureSensor
|
|
79
|
+
} else if (!this.TemperatureSensor?.Service) {
|
|
80
80
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Temperature Sensor Service`);
|
|
81
81
|
const TemperatureSensorService = `${accessory.displayName} Temperature Sensor`;
|
|
82
82
|
(this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor)
|
|
@@ -104,7 +104,7 @@ export class MeterPlus extends deviceBase {
|
|
|
104
104
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Humidity Sensor Service`);
|
|
105
105
|
this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor) as Service;
|
|
106
106
|
accessory.removeService(this.HumiditySensor!.Service);
|
|
107
|
-
} else if (!this.HumiditySensor
|
|
107
|
+
} else if (!this.HumiditySensor?.Service) {
|
|
108
108
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Humidity Sensor Service`);
|
|
109
109
|
const HumiditySensorService = `${accessory.displayName} Humidity Sensor`;
|
|
110
110
|
(this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor)
|
package/src/device/motion.ts
CHANGED
|
@@ -70,7 +70,7 @@ export class Motion extends deviceBase {
|
|
|
70
70
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Light Sensor Service`);
|
|
71
71
|
this.LightSensor!.Service = this.accessory.getService(this.hap.Service.LightSensor) as Service;
|
|
72
72
|
accessory.removeService(this.LightSensor!.Service);
|
|
73
|
-
} else if (!this.LightSensor
|
|
73
|
+
} else if (!this.LightSensor?.Service) {
|
|
74
74
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Light Sensor Service`);
|
|
75
75
|
const LightSensorService = `${accessory.displayName} Light Sensor`;
|
|
76
76
|
(this.LightSensor!.Service = this.accessory.getService(this.hap.Service.LightSensor)
|
|
@@ -71,7 +71,7 @@ export class WaterDetector extends deviceBase {
|
|
|
71
71
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Removing Leak Sensor Service`);
|
|
72
72
|
this.LeakSensor!.Service = this.accessory.getService(this.hap.Service.LeakSensor) as Service;
|
|
73
73
|
accessory.removeService(this.LeakSensor!.Service);
|
|
74
|
-
} else if (!this.LeakSensor
|
|
74
|
+
} else if (!this.LeakSensor?.Service) {
|
|
75
75
|
this.debugLog(`${this.device.deviceType}: ${accessory.displayName} Add Leak Sensor Service`);
|
|
76
76
|
const LeakSensorService = `${accessory.displayName} Leak Sensor`;
|
|
77
77
|
(this.LeakSensor!.Service = this.accessory.getService(this.hap.Service.LeakSensor)
|