Skip to content

Commit

Permalink
fix: dishwasher crashed #270
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Jan 28, 2024
1 parent e934f81 commit 7efddaf
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/devices/Dishwasher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export default class Dishwasher extends baseDevice {
if (this.delayTime > 3600) {
hourMinutes = 'Hours';
}
if (this.delayTime == 3600) {
if (this.delayTime === 3600) {
hourMinutes = 'Hour';

}
Expand All @@ -395,42 +395,42 @@ export default class Dishwasher extends baseDevice {
}
}
this.inputNameOptions = 'Options:';
if (this.Status.data.energySaver.includes('ON')) {
if (this.Status.data.energySaver?.includes('ON')) {
this.inputNameOptions += ' Energy Saver,';
}
if (this.Status.data.halfLoad.includes('ON')) {
if (this.Status.data.halfLoad?.includes('ON')) {
this.inputNameOptions += ' Half Load,';
}
if (this.Status.data.dualZone.includes('ON')) {
if (this.Status.data.dualZone?.includes('ON')) {
this.inputNameOptions += ' Dual Zone,';
}
if (this.Status.data.highTemp.includes('ON')) {
if (this.Status.data.highTemp?.includes('ON')) {
this.inputNameOptions += ' High Temp,';
}
if (this.Status.data.steam.includes('ON')) {
if (this.Status.data.steam?.includes('ON')) {
this.inputNameOptions += ' Steam,';
}
if (this.Status.data.extraRinse.includes('ON')) {
if (this.Status.data.extraRinse?.includes('ON')) {
this.inputNameOptions += ' Extra Rinse,';
}
if (this.Status.data.extraDry.includes('ON')) {
if (this.Status.data.extraDry?.includes('ON')) {
this.inputNameOptions += ' Extra Dry,';
}
if (this.Status.data.nightDry.includes('ON')) {
if (this.Status.data.nightDry?.includes('ON')) {
this.inputNameOptions += ' Night Dry,';
}
if (this.Status.data.delayStart.includes('ON')) {
if (this.Status.data.delayStart?.includes('ON')) {
this.inputNameOptions += ' Delay Start,';
}
if (!this.Status.data.energySaver.includes('ON') &&
!this.Status.data.halfLoad.includes('ON') &&
!this.Status.data.dualZone.includes('ON') &&
!this.Status.data.highTemp.includes('ON') &&
!this.Status.data.steam.includes('ON') &&
!this.Status.data.extraRinse.includes('ON') &&
!this.Status.data.extraDry.includes('ON') &&
!this.Status.data.nightDry.includes('ON') &&
!this.Status.data.delayStart.includes('ON')) {
if (!this.Status.data.energySaver?.includes('ON') &&
!this.Status.data.halfLoad?.includes('ON') &&
!this.Status.data.dualZone?.includes('ON') &&
!this.Status.data.highTemp?.includes('ON') &&
!this.Status.data.steam?.includes('ON') &&
!this.Status.data.extraRinse?.includes('ON') &&
!this.Status.data.extraDry?.includes('ON') &&
!this.Status.data.nightDry?.includes('ON') &&
!this.Status.data.delayStart?.includes('ON')) {
this.inputNameOptions += ' None,';
}
this.inputNameOptions = this.inputNameOptions.substring(0, this.inputNameOptions.length - 1);
Expand Down

0 comments on commit 7efddaf

Please sign in to comment.