Skip to content

Commit

Permalink
Check for valid Zigbee channel. #1077
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Feb 13, 2019
1 parent a62f428 commit 88cec5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/zigbee.js
Expand Up @@ -8,6 +8,11 @@ const Queue = require('queue');
const zclId = require('zcl-id');

const advancedSettings = settings.get().advanced;

if (advancedSettings.channel < 11 || advancedSettings.channel > 26) {
throw new Error(`'${advancedSettings.channel}' is an invalid channel, use a channel between 11 - 26.`);
}

const shepherdSettings = {
net: {
panId: advancedSettings.pan_id,
Expand Down

0 comments on commit 88cec5d

Please sign in to comment.