Skip to content

Commit

Permalink
fix: Fixed showSpeed and showPresetMode (denysdovhan#63)
Browse files Browse the repository at this point in the history
* Update styles.js

* Update purifier-card.js

Co-authored-by: Denys Dovhan <[email protected]>
  • Loading branch information
William Kethman and denysdovhan authored Aug 13, 2021
1 parent 8e0062e commit 2027560
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/purifier-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class PurifierCard extends LitElement {
} = this.entity;

// TODO handle percentages
if (!this.showSpeed() || !speed_list || !(supported_features & SUPPORT_SET_SPEED)) {
if (!this.showSpeed || !speed_list || !(supported_features & SUPPORT_SET_SPEED)) {
return html``;
}

Expand Down Expand Up @@ -203,7 +203,7 @@ class PurifierCard extends LitElement {
attributes: { preset_mode, preset_modes, supported_features },
} = this.entity;

if (!this.showPresetMode() || !preset_modes || !(supported_features & SUPPORT_PRESET_MODE)) {
if (!this.showPresetMode || !preset_modes || !(supported_features & SUPPORT_PRESET_MODE)) {
return html``;
}

Expand Down Expand Up @@ -434,8 +434,8 @@ class PurifierCard extends LitElement {
?more-info="true"
>
<div class="header">
${this.renderSpeed()}
${this.renderPresetMode()}
<div class="speed">${this.renderSpeed()}</div>
<div class="preset-mode">${this.renderPresetMode()}</div>
</div>
<div class="image ${className}">${this.renderAQI()}</div>
Expand Down
1 change: 1 addition & 0 deletions src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default css`
.header {
display: flex;
color: var(--text-primary-color);
margin-top: 5px;
}
.image {
Expand Down

0 comments on commit 2027560

Please sign in to comment.