homebridge-tydom 0.23.1 → 0.23.3

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.
@@ -92,6 +92,10 @@ const setupGarageDoorOpener = (accessory, controller) => {
92
92
  return 0;
93
93
  };
94
94
  // Add the actual accessory Service
95
+ const legacyService = accessory.getService(hap_1.Service.Switch);
96
+ if (legacyService) {
97
+ accessory.removeService(legacyService);
98
+ }
95
99
  const service = (0, accessory_1.addAccessoryService)(accessory, hap_1.Service.GarageDoorOpener, `${accessory.displayName}`, true);
96
100
  service
97
101
  .getCharacteristic(CurrentDoorState)
@@ -122,10 +126,6 @@ const setupGarageDoorOpener = (accessory, controller) => {
122
126
  })
123
127
  .on("set" /* CharacteristicEventTypes.SET */, async (value, callback) => {
124
128
  (0, debug_1.debugSet)(TargetDoorState, service, value);
125
- if (!value) {
126
- callback();
127
- return;
128
- }
129
129
  try {
130
130
  (0, debug_1.debugSetResult)(TargetDoorState, service, value);
131
131
  const targetDoorState = (0, basic_1.asNumber)(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-tydom",
3
- "version": "0.23.1",
3
+ "version": "0.23.3",
4
4
  "description": "Homebridge plugin to manage Tydom devices by Delta Dore",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",