Skip to content

Commit

Permalink
Bug fixes when box offline
Browse files Browse the repository at this point in the history
  • Loading branch information
gadget-man committed Jul 21, 2021
1 parent fd92a7a commit 81f64a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/iparcelbox-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ const header = {
unknown: {
icon: 'iparcelbox:icon',
label: 'Unable to retrieve status'
},
unavailable: {
icon: 'iparcelbox:icon',
label: 'Unable to retrieve status'
}
},
};
Expand Down Expand Up @@ -446,6 +450,7 @@ export class IParcelBoxCard extends LitElement {


callService(service, key, data = { 'device_id': this.config.device_id }): void {
// console.log("Call service: " + this.config.device_id);
this.activeButton(key);
const [domain, name] = service.split('.');
this._hass.callService(domain, name, data);
Expand Down Expand Up @@ -674,6 +679,7 @@ export class IParcelBoxCard extends LitElement {


renderButton(data): any {
// console.log("Button data: " + data.key + " " + data.service);
return data && data.show !== false
? html`<div class="button" id="${data.key}"><ha-label-badge
icon="${data.icon}"
Expand Down

0 comments on commit 81f64a5

Please sign in to comment.