Skip to content

Commit

Permalink
fix active mode render conditions (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Oct 18, 2021
1 parent daf2885 commit 00e08cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions climate-mode-entity-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@

renderMode(mode) {
const isActive =
(!mode.preset_mode == null ||
(mode.preset_mode == null ||
mode.preset_mode === this.state.preset_mode) &&
(!mode.hvac_mode == null || mode.hvac_mode === this.state.hvac_mode) &&
(!mode.fan_mode == null || mode.fan_mode === this.state.fan_mode) &&
(!mode.swing_mode == null ||
(mode.hvac_mode == null || mode.hvac_mode === this.state.hvac_mode) &&
(mode.fan_mode == null || mode.fan_mode === this.state.fan_mode) &&
(mode.swing_mode == null ||
mode.swing_mode === this.state.swing_mode) &&
(mode.temperature == null ||
mode.temperature === this.state.temperature);
Expand Down

0 comments on commit 00e08cc

Please sign in to comment.