Skip to content

Commit

Permalink
Merge pull request #460 from Barma-lej/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Barma-lej authored Oct 30, 2024
2 parents 3ef6de9 + ab4485b commit 3f7fa19
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/landroid-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,11 @@ class LandroidCard extends LitElement {
handleAction(e, action, params = {}) {
const actions = this.config.actions || {};
const {defaultService = action, ...service_data} = params;
return () => {
if (!actions[action]) {
this.callService(e, defaultService, service_data);
return;
}

this.callAction(actions[action]);
};
// return () => {
actions[action]
? this.callAction(actions[action])
: this.callService(e, defaultService, service_data);
// };
}

/**
Expand Down Expand Up @@ -1019,8 +1016,6 @@ return html`
${this.renderTipButton(consts.STATISTICSCARD)}
${this.renderTipButton(consts.BATTERYCARD)}
</div>
<div class="preview">
</div>
${Object.values(consts.CARD_MAP).map((card) => this.renderEntitiesCard(this.findEntitiesIdBySuffixes(card.entities), card.visibility))}
<div class="preview">
${this.renderCameraOrImage(state)}
Expand Down

0 comments on commit 3f7fa19

Please sign in to comment.