Skip to content

Commit 227b823

Browse files
committed
Fix Powerwall2 client not able to refresh token if login fails once
1 parent 4f01505 commit 227b823

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/connections/powerwall2/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export class Powerwall2Client {
9494
} catch (error) {
9595
this.logger.error(error, 'Powerwall2 login error');
9696

97+
this.token = { type: 'none' };
98+
9799
throw new Error(`Powerwall2 get token error`);
98100
}
99101
})();

0 commit comments

Comments
 (0)