Skip to content

Commit

Permalink
Ability to ignore an accessory in the config (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Rhodes committed Jan 1, 2020
1 parent 4137802 commit bbe0b1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const BroadlinkRMPlatform = class extends HomebridgePlatform {

// Itterate through the config accessories
config.accessories.forEach((accessory) => {
// Optionally hide the accessory from Homekit
if (accessory.ignore === true) return

if (!accessory.type) throw new Error(`Each accessory must be configured with a "type". e.g. "switch"`);

if (!classTypes[accessory.type]) throw new Error(`homebridge-broadlink-rm doesn't support accessories of type "${accessory.type}".`);
Expand Down

0 comments on commit bbe0b1f

Please sign in to comment.