Skip to content

Commit

Permalink
Print productName in case of unknown device type
Browse files Browse the repository at this point in the history
  • Loading branch information
zyonse committed Feb 5, 2024
1 parent f3e14f6 commit 20d3641
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ export class DreoPlatform implements DynamicPlatformPlugin {
new FanAccessory(this, existingAccessory, state, ws);
break;
case 'Heater':
this.log.error('error, unsupported device type:', device.productName);
break;
default:
this.log.error('error, unknown device type');
this.log.error('error, unknown device type:', device.productName);
}

// it is possible to remove platform accessories at any time using `api.unregisterPlatformAccessories`, eg.:
Expand Down Expand Up @@ -163,9 +164,10 @@ export class DreoPlatform implements DynamicPlatformPlugin {
new FanAccessory(this, accessory, state, ws);
break;
case 'Heater':
this.log.error('error, unsupported device type:', device.productName);
break;
default:
this.log.error('error, unknown device type');
this.log.error('error, unknown device type:', device.productName);
}

// link the accessory to your platform
Expand Down

0 comments on commit 20d3641

Please sign in to comment.