mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-23 21:03:36 +00:00
Add the ability to remove services/characteristics
This commit is contained in:
@@ -32,6 +32,10 @@ function Server(insecureAccess) {
|
||||
this._handleRegisterPlatformAccessories(accessories);
|
||||
}.bind(this));
|
||||
|
||||
this._api.on('updatePlatformAccessories', function(accessories) {
|
||||
this._handleUpdatePlatformAccessories(accessories);
|
||||
}.bind(this));
|
||||
|
||||
this._api.on('unregisterPlatformAccessories', function(accessories) {
|
||||
this._handleUnregisterPlatformAccessories(accessories);
|
||||
}.bind(this));
|
||||
@@ -408,6 +412,11 @@ Server.prototype._handleRegisterPlatformAccessories = function(accessories) {
|
||||
this._updateCachedAccessories();
|
||||
}
|
||||
|
||||
Server.prototype._handleUpdatePlatformAccessories = function(accessories) {
|
||||
// Update persisted accessories
|
||||
this._updateCachedAccessories();
|
||||
}
|
||||
|
||||
Server.prototype._handleUnregisterPlatformAccessories = function(accessories) {
|
||||
var hapAccessories = [];
|
||||
for (var index in accessories) {
|
||||
|
||||
Reference in New Issue
Block a user