Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Aug 29, 2021
1 parent c3bd6db commit 61409a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ class xboxTvPlatform {
constructor(log, config, api) {
// only load if configured
if (!config || !Array.isArray(config.devices)) {
log('No data found for homebridge-xbox-tv');
log('No configuration found for %s', PLUGIN_NAME);
return;
}
this.log = log;
this.config = config;
this.api = api;
this.devices = config.devices || [];
this.accessories = [];
Expand All @@ -101,24 +100,22 @@ class xboxTvPlatform {
this.log.debug('didFinishLaunching');
for (let i = 0; i < this.devices.length; i++) {
const device = this.devices[i];
const deviceName = device.name;
if (!deviceName) {
this.log.warn('Device Name Missing')
if (!device.name) {
this.log.warn('Device Name Missing');
} else {
this.log.info('Adding new accessory:', deviceName);
new xboxTvDevice(this.log, device, this.api);
}
}
});
}

configureAccessory(accessory) {
this.log.debug('configureAccessory');
this.log.debug('configurePlatformAccessory');
this.accessories.push(accessory);
}

removeAccessory(accessory) {
this.log.debug('removeAccessory');
this.log.debug('removePlatformAccessory');
this.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
}
}
Expand All @@ -127,7 +124,6 @@ class xboxTvDevice {
constructor(log, config, api) {
this.log = log;
this.api = api;
this.config = config;

//device configuration
this.name = config.name;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Xbox TV",
"name": "homebridge-xbox-tv",
"version": "1.6.44",
"version": "1.6.46",
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
"license": "MIT",
"author": "grzegorz914",
Expand Down

0 comments on commit 61409a3

Please sign in to comment.