Skip to content

Commit

Permalink
ESLint fix: error 'pass' is defined but never used no-unused-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
DutchmanNL committed Nov 1, 2023
1 parent 050c2d1 commit 3852163
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class Esphome extends utils.Adapter {

// Get basic data of known devices and start reading data
for (const i in knownDevices) {
this.connectDevices(knownDevices[i].native.ip, this.decrypt(knownDevices[i].native.passWord));
this.connectDevices(knownDevices[i].native.ip);
}
} catch (e) {
this.sendSentry(`[tryKnownDevices] ${e}`);
Expand All @@ -173,7 +173,7 @@ class Esphome extends utils.Adapter {
this.log.debug(`Discovery message ${JSON.stringify(message)}`);
if (this.deviceInfo[message.address] == null) {
this.log.info(`[AutoDiscovery] New ESPHome device found at IP ${message.address}, trying to initialize`);
this.connectDevices(`${message.address}`, `${apiPass}`);
this.connectDevices(`${message.address}`);
}
} catch (e) {
this.log.error(`[deviceDiscovery handler] ${e}`);
Expand All @@ -188,9 +188,8 @@ class Esphome extends utils.Adapter {
/**
* Handle Socket connections
* @param {string} host IP adress of device
* @param {string | number | boolean} pass Password used for APU
*/
connectDevices(host, pass) {
connectDevices(host) {
try {
// const host = espDevices[device].ip;
this.log.info(`Try to connect to ${host}`);
Expand Down Expand Up @@ -1029,7 +1028,7 @@ class Esphome extends utils.Adapter {
this.log.info(`Valid IP address received`);
this.messageResponse[obj.message['device-ip']] = obj;
// const pass = this.decrypt(obj.message['device-pass']);
await this.connectDevices(obj.message['device-ip'], apiPass);
await this.connectDevices(obj.message['device-ip']);
}
break;
}
Expand Down

0 comments on commit 3852163

Please sign in to comment.