Skip to content

Commit

Permalink
Update version to 1.1.1-dev.2 and enhance device validation in Shelly…
Browse files Browse the repository at this point in the history
…Platform
  • Loading branch information
Luligu committed Dec 18, 2024
1 parent 1a3ad05 commit 4112339
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you like this project and find it useful, please consider giving it a star on

You can also sponsor Tamer here https://buymeacoffee.com/6sjde6vkzl for his invaluable contribution to this project.

## [1.1.1-dev.1] - 2024-12-17
## [1.1.1-dev.2] - 2024-12-18

### Added

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matterbridge-shelly",
"version": "1.1.1-dev.1",
"version": "1.1.1-dev.2",
"description": "Matterbridge shelly plugin",
"author": "https://github.com/Luligu",
"license": "Apache-2.0",
Expand Down Expand Up @@ -128,4 +128,4 @@
"typescript": "5.7.2",
"typescript-eslint": "8.18.1"
}
}
}
5 changes: 4 additions & 1 deletion src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,10 @@ export class ShellyPlatform extends MatterbridgeDynamicPlatform {
this.log.error(`Failed to create Shelly device ${hk}${deviceId}${er} host ${zb}${host}${er}`);
return;
}
if (!this.validateDeviceWhiteBlackList([device.id, device.mac, device.name])) return;
if (!this.validateDeviceWhiteBlackList([device.id, device.mac, device.name])) {
device.destroy();
return;
}

log.logName = device.name ?? device.id;
await this.shelly.addDevice(device);
Expand Down

0 comments on commit 4112339

Please sign in to comment.