Skip to content

Commit

Permalink
chore(log): add extra log when overriding categories
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Aug 22, 2023
1 parent 6a3e496 commit 0d246b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ export default class TydomController extends EventEmitter {
if (excludedDevices.length && stringIncludes(excludedDevices, deviceId)) {
return;
}
if (categoryFromSettings) {
this.log.info(
`Using overriden category=${chalkNumber(categoryFromSettings)} from settings for deviceId=${chalkNumber(
deviceId
)} and endpointId=${chalkNumber(endpointId)}`
);
}
const category =
categoryFromSettings || resolveEndpointCategory({firstUsage, metadata, settings: deviceSettings});
if (!category) {
Expand Down

0 comments on commit 0d246b4

Please sign in to comment.