Skip to content

Commit

Permalink
fix: add missing space in version console.info
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdovhan committed Aug 18, 2021
1 parent 37d2383 commit c546542
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/purifier-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styles from './styles';
import { version } from '../package.json';

console.info(
`%c PURIFIER-CARD %c ${version}`,
`%c PURIFIER-CARD %c ${version} `,
'color: white; background: blue; font-weight: 700;',
'color: blue; background: white; font-weight: 700;'
);
Expand Down Expand Up @@ -50,23 +50,23 @@ class PurifierCard extends LitElement {
get entity() {
return this.hass.states[this.config.entity];
}

get showSpeed() {
if (this.config.show_speed === undefined) {
return false;
}

return this.config.show_speed;
}

get showPresetMode() {
if (this.config.show_preset_mode === undefined) {
return true;
}

return this.config.show_preset_mode;
}

get showName() {
if (this.config.show_name === undefined) {
return true;
Expand Down Expand Up @@ -167,7 +167,11 @@ 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 @@ -209,7 +213,11 @@ 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 @@ -441,7 +449,7 @@ class PurifierCard extends LitElement {
>
<div class="header">
<div class="speed">${this.renderSpeed()}</div>
<div class="preset-mode">${this.renderPresetMode()}</div>
<div class="preset-mode">${this.renderPresetMode()}</div>
</div>
<div class="image ${className}">${this.renderAQI()}</div>
Expand Down

0 comments on commit c546542

Please sign in to comment.