homebridge-ihc
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -42,3 +42,3 @@ { | ||
"type": "string", | ||
"placeholder": "Ceiling Light" | ||
"placeholder": "Ceiling Light" | ||
}, | ||
@@ -48,28 +48,28 @@ "id": { | ||
"type": "string", | ||
"placeholder": "2300178" | ||
"placeholder": "2300178" | ||
}, | ||
"type": { | ||
"title": "Device Type", | ||
"type": "string", | ||
"enum": ["light", "switch"] | ||
}, | ||
"metadata": { | ||
"title": "Metadata", | ||
"type": "object", | ||
"properties": { | ||
"manufacturer": { | ||
"title": "Manufacturer", | ||
"type": "string", | ||
"placeholder": "LK IHC" | ||
}, | ||
"model": { | ||
"title": "Model", | ||
"type": "string" | ||
}, | ||
"serial": { | ||
"title": "Serial Number", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
"type": { | ||
"title": "Device Type", | ||
"type": "string", | ||
"enum": ["light", "switch", "button"] | ||
}, | ||
"metadata": { | ||
"title": "Metadata", | ||
"type": "object", | ||
"properties": { | ||
"manufacturer": { | ||
"title": "Manufacturer", | ||
"type": "string", | ||
"placeholder": "LK IHC" | ||
}, | ||
"model": { | ||
"title": "Model", | ||
"type": "string" | ||
}, | ||
"serial": { | ||
"title": "Serial Number", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
@@ -76,0 +76,0 @@ } |
@@ -7,2 +7,3 @@ "use strict"; | ||
const index_1 = require("./platforms/index"); | ||
const stateless_switch_1 = require("./platforms/stateless-switch"); | ||
class HomebridgeIHC { | ||
@@ -48,3 +49,8 @@ constructor(log, config, api) { | ||
// } | ||
new index_1.BasePlatformAccessory(this, existingAccessory, request); | ||
if (existingAccessory.context.device.type === "button") { | ||
new stateless_switch_1.StatelessSwitchlatformAccessory(this, existingAccessory, request); | ||
} | ||
else { | ||
new index_1.BasePlatformAccessory(this, existingAccessory, request); | ||
} | ||
} | ||
@@ -63,3 +69,8 @@ else { | ||
// } | ||
new index_1.BasePlatformAccessory(this, accessory, request); | ||
if (accessory.context.device.type === "button") { | ||
new stateless_switch_1.StatelessSwitchlatformAccessory(this, accessory, request); | ||
} | ||
else { | ||
new index_1.BasePlatformAccessory(this, accessory, request); | ||
} | ||
this.api.registerPlatformAccessories(settings_1.PLUGIN_NAME, settings_1.PLATFORM_NAME, [accessory]); | ||
@@ -66,0 +77,0 @@ } |
{ | ||
"displayName": "Homebridge IHC", | ||
"name": "homebridge-ihc", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A short description about what your plugin does.", | ||
@@ -6,0 +6,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
60147
48
541