Skip to content

Commit

Permalink
add warning for invalid code
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Dec 2, 2022
1 parent 9cc9324 commit 88492a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/device/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ export default class {
// Return now, so we don't hit the code below for removing the characteristic
return;
}

// If here then the scene code exists in the config but is invalid format
accessory.logWarn(`[${scene}] is not a valid code - please update with a new code from the log that starts with 33`);
}

// If here then either not set up or code is invalid or connection method not enabled
// If here then either code is invalid or has been removed, so remove the characteristic
if (this.service.testCharacteristic(this.cusChar[charName])) {
this.service.removeCharacteristic(this.service.getCharacteristic(this.cusChar[charName]));
}
Expand Down

0 comments on commit 88492a0

Please sign in to comment.