From 812b6fbc469899044bcef89520f8a92f52a534dd Mon Sep 17 00:00:00 2001 From: Cloos <36499953+Clooos@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:53:06 +0100 Subject: [PATCH] v1.4.3 --- src/bubble-card.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bubble-card.js b/src/bubble-card.js index 9209f1ce..a20a0dfb 100644 --- a/src/bubble-card.js +++ b/src/bubble-card.js @@ -1,4 +1,4 @@ -var version = 'v1.4.2'; +var version = 'v1.4.3'; let editor; let entityStates = {}; @@ -542,9 +542,9 @@ class BubbleCard extends HTMLElement { : 'rgba(255, 255, 255, 1'); this.rgbColorOpacity = rgbColor ? (!isColorCloseToWhite(rgbColor) ? `rgba(${rgbColor}, 0.5)` : 'rgba(255,220,200, 0.5)') - : (stateOn - ? (entityId.startsWith("light.") ? 'rgba(255,220,200, 0.5)' : 'var(--accent-color)') - : 'var(--background-color,var(--secondary-background-color))'); + : (entityId && stateOn + ? (entityId.startsWith("light.") ? 'rgba(255,220,200, 0.5)' : 'var(--accent-color)') + : 'var(--background-color,var(--secondary-background-color))'); rgbaBgColor = convertToRGBA(color, 0); this.iconFilter = rgbColor ? (!isColorCloseToWhite(rgbColor) ? 'brightness(1.1)' : 'none') : @@ -706,7 +706,7 @@ class BubbleCard extends HTMLElement { padding: 6px; z-index: 1; flex-grow: 1; - background-color: ${this.rgbColorOpacity}; + background-color: ${entityId ? this.rgbColorOpacity : 'var(--background-color,var(--secondary-background-color))'}; transition: background 1s; border-radius: 25px; margin-right: 14px; @@ -800,7 +800,7 @@ class BubbleCard extends HTMLElement { const triggerClose = this.config.trigger_close ? this.config.trigger_close : false; const stateEntity = this.config.state; - if (!this.popUp) { + if (this.popUp !== this.getRootNode().querySelector('#root')) { let initPopUp = setInterval(() => { createPopUp(); if (this.popUp) {