diff --git a/src/vacuum-card.ts b/src/vacuum-card.ts
index aa4afd66..4115d0bd 100755
--- a/src/vacuum-card.ts
+++ b/src/vacuum-card.ts
@@ -31,13 +31,13 @@ const PKG_VERSION = 'PKG_VERSION_VALUE';
console.info(
`%c VACUUM-CARD %c ${PKG_VERSION}`,
'color: white; background: blue; font-weight: 700;',
- 'color: blue; background: white; font-weight: 700;'
+ 'color: blue; background: white; font-weight: 700;',
);
if (!customElements.get('ha-icon-button')) {
customElements.define(
'ha-icon-button',
- class extends (customElements.get('paper-icon-button') ?? HTMLElement) {}
+ class extends (customElements.get('paper-icon-button') ?? HTMLElement) {},
);
}
@@ -105,7 +105,7 @@ export class VacuumCard extends LitElement {
this.requestUpdate();
this.thumbUpdater = setInterval(
() => this.requestUpdate(),
- this.config.map_refresh * 1000
+ this.config.map_refresh * 1000,
);
}
}
@@ -127,7 +127,7 @@ export class VacuumCard extends LitElement {
{
bubbles: false,
composed: true,
- }
+ },
);
}
@@ -140,7 +140,7 @@ export class VacuumCard extends LitElement {
private callVacuumService(
service: ServiceCallRequest['service'],
params: VacuumServiceCallParams = { request: true },
- options: ServiceCallRequest['serviceData'] = {}
+ options: ServiceCallRequest['serviceData'] = {},
) {
this.hass.callService('vacuum', service, {
entity_id: this.config.entity,
@@ -160,7 +160,7 @@ export class VacuumCard extends LitElement {
private handleVacuumAction(
action: string,
- params: VacuumActionParams = { request: true }
+ params: VacuumActionParams = { request: true },
) {
return () => {
if (!this.config.actions[action]) {
@@ -175,14 +175,14 @@ export class VacuumCard extends LitElement {
const { status, state } = entity.attributes;
return {
- status: status || state || entity.state,
...entity.attributes,
+ status: status ?? state ?? entity.state,
};
}
private renderSource(): Template {
const { fan_speed: source, fan_speed_list: sources } = this.getAttributes(
- this.entity
+ this.entity,
);
if (!sources || !source) {
@@ -201,16 +201,15 @@ export class VacuumCard extends LitElement {
${sources.map(
- (item, index) =>
- html`
-