From 77df0609ca2bd9d3da9011e8d052c64f5e97ff99 Mon Sep 17 00:00:00 2001 From: Chester Date: Mon, 7 Mar 2022 16:44:43 +0100 Subject: [PATCH] garage door added --- package-lock.json | 4 ++-- src/Accessories/VideoDoorbell.ts | 2 +- src/platform.ts | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71e0321..fb9c9d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-smarthomeng", - "version": "2.0.0", + "version": "2.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "homebridge-smarthomeng", - "version": "2.0.0", + "version": "2.0.4", "license": "Apache-2.0", "dependencies": { "ws": "^8.4.2" diff --git a/src/Accessories/VideoDoorbell.ts b/src/Accessories/VideoDoorbell.ts index 915081c..7f00bc7 100644 --- a/src/Accessories/VideoDoorbell.ts +++ b/src/Accessories/VideoDoorbell.ts @@ -29,7 +29,7 @@ export class Doorbell implements AccessoryPlugin { .setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.singlepress); this.platform.shng.addMonitor(accessory.contactstate, this.shngCallback.bind(this)); - this.platform.log.info('ContactSensor', accessory.name, 'created!'); + this.platform.log.info('Doorbell', accessory.name, 'created!'); } identify(): void { diff --git a/src/platform.ts b/src/platform.ts index a290853..43157c7 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -21,6 +21,7 @@ import { Doorbell } from './Accessories/Doorbell'; import { SecuritySystem } from './Accessories/SecuritySystem'; import { OccupancySensor } from './Accessories/OccupancySensor'; import { MotionSensor } from './Accessories/MotionSensor'; +import { GarageDoor } from './Accessories/GarageDoor'; function uncapitalizeKeys(obj): Record { function isObject(o: unknown): boolean { @@ -146,6 +147,11 @@ export class SmartHomeNGPlatform implements StaticPlatformPlugin { devices.push(new WindowCovering(this, accessory)); break; + // GarageDoor + case 'garagedoor': + devices.push(new GarageDoor(this, accessory)); + break; + // Show error for (yet ?) unsupported device default: this.log.warn('Accessory type', accessory.type, 'for', accessory.name, 'not recognized !');