diff --git a/plugins/homekit/package-lock.json b/plugins/homekit/package-lock.json index b3b1954a5..3839a032c 100644 --- a/plugins/homekit/package-lock.json +++ b/plugins/homekit/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/homekit", - "version": "1.2.8", + "version": "1.2.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/homekit", - "version": "1.2.8", + "version": "1.2.11", "dependencies": { "@koush/werift-src": "file:../../external/werift", "check-disk-space": "^3.3.0", diff --git a/plugins/homekit/package.json b/plugins/homekit/package.json index 37ba61dd4..981a41d20 100644 --- a/plugins/homekit/package.json +++ b/plugins/homekit/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/homekit", - "version": "1.2.8", + "version": "1.2.11", "description": "HomeKit Plugin for Scrypted", "scripts": { "scrypted-setup-project": "scrypted-setup-project", diff --git a/plugins/homekit/src/types/index.ts b/plugins/homekit/src/types/index.ts index 379891b89..257498214 100644 --- a/plugins/homekit/src/types/index.ts +++ b/plugins/homekit/src/types/index.ts @@ -12,3 +12,4 @@ import './switch'; import './thermostat'; import './vacuum'; import './outlet'; +import './notifier'; diff --git a/plugins/homekit/src/types/notifier.ts b/plugins/homekit/src/types/notifier.ts new file mode 100644 index 000000000..751ede590 --- /dev/null +++ b/plugins/homekit/src/types/notifier.ts @@ -0,0 +1,14 @@ +import { OnOff, ScryptedDevice, ScryptedDeviceType } from '@scrypted/sdk'; +import { addSupportedType, } from '../common'; +import { Service } from '../hap'; +import { getAccessory, probe } from './onoff-base'; +import type { HomeKitPlugin } from "../main"; + +addSupportedType({ + type: ScryptedDeviceType.Notifier, + probe, + getAccessory: async (device: ScryptedDevice & OnOff, homekitPlugin: HomeKitPlugin) => { + const {accessory, service} = getAccessory(device, homekitPlugin, Service.Switch); + return accessory; + } +});