diff --git a/src/panels/lovelace/cards/hui-picture-elements-card.js b/src/panels/lovelace/cards/hui-picture-elements-card.js index ae47fd80b0..19a8e7d6e9 100644 --- a/src/panels/lovelace/cards/hui-picture-elements-card.js +++ b/src/panels/lovelace/cards/hui-picture-elements-card.js @@ -89,7 +89,7 @@ class HuiPictureElementsCard extends LocalizeMixin(EventsMixin(PolymerElement)) if (element.type === 'state-badge') { const entityId = element.entity; el = document.createElement('state-badge'); - el.addEventListener('click', () => this._handleClick(entityId, element.action === 'toggle')); + el.addEventListener('click', () => this._handleClick(entityId, element.tap_action === 'toggle')); el.classList.add('clickable'); this._requiresStateObj.push({ el, entityId }); } else if (element.type === 'state-text') { diff --git a/src/panels/lovelace/cards/hui-picture-entity-card.js b/src/panels/lovelace/cards/hui-picture-entity-card.js index 85488a3918..e67d94abe1 100644 --- a/src/panels/lovelace/cards/hui-picture-entity-card.js +++ b/src/panels/lovelace/cards/hui-picture-entity-card.js @@ -141,8 +141,8 @@ class HuiPictureEntityCard extends LocalizeMixin(PolymerElement) { return; } - const stateDomain = computeDomain(entityId); - if (stateDomain === 'weblink') { + const domain = computeDomain(entityId); + if (domain === 'weblink') { window.open(this.hass.states[entityId].state); } else { toggleEntity(this.hass, entityId); diff --git a/src/panels/lovelace/hui-root.js b/src/panels/lovelace/hui-root.js index 504187b616..218ead4b54 100644 --- a/src/panels/lovelace/hui-root.js +++ b/src/panels/lovelace/hui-root.js @@ -62,11 +62,11 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) {