Skip to content

Commit

Permalink
Fixed legitimate issues found with linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Perera committed Jun 21, 2021
1 parent ab8dcf0 commit 9a78ce4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"dot-notation": "warn",
"no-autofix/prefer-const": "warn",


"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"curly": 1
Expand Down
4 changes: 2 additions & 2 deletions accessories/fan.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class FanAccessory extends SwitchAccessory {

async checkAutoOff() {
await catchDelayCancelError(async () => {
const { config, log, name, state, serviceManager } = this;
const { config, log, logLevel, name, state, serviceManager } = this;
let { disableAutomaticOff, enableAutoOff, onDuration } = config;

if (state.switchState && enableAutoOff) {
Expand All @@ -76,7 +76,7 @@ class FanAccessory extends SwitchAccessory {

async checkAutoOn() {
await catchDelayCancelError(async () => {
const { config, log, name, state, serviceManager } = this;
const { config, log, logLevel, name, state, serviceManager } = this;
let { disableAutomaticOn, enableAutoOn, offDuration } = config;

if (!state.switchState && enableAutoOn) {
Expand Down
4 changes: 2 additions & 2 deletions accessories/heater-cooler.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class HeaterCoolerAccessory extends BroadlinkRMAccessory {
}
// do not change state of fanspeed mode
if (keys.includes('fanSpeedDnd')) {
return decodeHierarchichalHex(hexDataObject['fanSpeedDnd'], checkCharacteristics, toUpdateCharacteristic)
return this.decodeHierarchichalHex(hexDataObject['fanSpeedDnd'], checkCharacteristics, toUpdateCharacteristic)
}
if (keys.includes(keyFromState)) {
return this.decodeHierarchichalHex(hexDataObject[keyFromState], checkCharacteristics, toUpdateCharacteristic)
Expand Down Expand Up @@ -749,7 +749,7 @@ class HeaterCoolerAccessory extends BroadlinkRMAccessory {
}

async checkTemperatureForAutoOnOff(temperature) {
const { config, host, log, name, serviceManager, state } = this;
const { config, host, log, logLevel, name, serviceManager, state } = this;
let { autoHeatTemperature, autoCoolTemperature, minimumAutoOnOffDuration } = config;

if (this.shouldIgnoreAutoOnOff) {
Expand Down
3 changes: 1 addition & 2 deletions accessories/learnCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class LearnIRAccessory extends BroadlinkRMAccessory {
bind: this,
props: {

},
bind: this
}
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion accessories/switchMultiRepeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SwitchMultiAccessory extends SwitchAccessory {
await this.pauseTimeoutPromise;
} else if (index < data.length - 1) {
this.intervalTimeoutPromise = delayForDuration(interval);
await intervalTimeoutPromise;
await this.intervalTimeoutPromise;
}
}

Expand Down
8 changes: 4 additions & 4 deletions base/accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class HomebridgeAccessory {
}

setDefaults() {
if(config.allowResend === undefined){
if(config.preventResendHex === undefined){
config.allowResend = true;
if (this.config.allowResend === undefined) {
if (this.config.preventResendHex === undefined) {
this.config.allowResend = true;
} else {
config.allowResend = !config.preventResendHex;
this.config.allowResend = !this.config.preventResendHex;
}
}
}
Expand Down

0 comments on commit 9a78ce4

Please sign in to comment.