Skip to content

Commit

Permalink
improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Aug 20, 2023
1 parent 0ee47db commit 59a0275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ This project tries to adhere to [Semantic Versioning](http://semver.org/). In pr
- `MINOR` version when a new device type is added, or when a new feature is added that is backwards-compatible
- `PATCH` version when backwards-compatible bug fixes are implemented

## BETA

### Changed

- Improve error logging for locally configured devices when missing the `model` config property

## 9.2.3 (2023-08-19)

### Changed
Expand Down
6 changes: 6 additions & 0 deletions lib/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ export default class {
Object.values(this.deviceConf)
.filter((el) => el.deviceUrl)
.forEach((device) => {
// Ensure we have a model property if a user key is configured
if (this.config.userkey && !device.model) {
this.log.warn('[%s] missing config property \'model\' for this device.', device.name);
return;
}

// Rename some properties to fit the format of a cloud device
// Local devices don't have the uuid already set
device.uuid = device.serialNumber;
Expand Down

0 comments on commit 59a0275

Please sign in to comment.