Skip to content

Commit

Permalink
Fixed username and password validation
Browse files Browse the repository at this point in the history
  • Loading branch information
K1LL3R234 committed Jan 6, 2025
1 parent 2986525 commit 7d6dc33
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This change log documents all release versions of homebridge-texecom

### 1.0.7 (2025-01-06)
- **BUG** - Fixed issue to check if username and password is saved and valid.

### 1.0.6 (2024-11-06)
- **BUG** - Fixed string version in package
Expand Down
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ function SunsynkPlatform(log, config) {
this.username = config.options.username;
this.password = config.options.password;

// Validate username and password
if (!this.username || !this.password) {
this.log.error("Username or password is missing in the configuration. Please check your config file.");
return;
}

pollInterval = config.options.pollInterval * 60000;
lowbatt = config.options.lowbatt;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"displayName": "Homebridge Sunsynk",
"name": "homebridge-sunsynk",
"description": "A plugin for homebridge to integrate Sunsynk inverter into HomeKit",
"version": "1.0.6",
"version": "1.0.7",
"author": {
"name": "Chris Posthumus",
"email": "[email protected]"
Expand Down

0 comments on commit 7d6dc33

Please sign in to comment.