From 2443e180387e012b4d122c1ab7c0a531c9c1e452 Mon Sep 17 00:00:00 2001 From: Cloos <36499953+Clooos@users.noreply.github.com> Date: Sun, 15 Oct 2023 11:56:57 +0200 Subject: [PATCH] v1.2.4 --- src/bubble-card.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bubble-card.js b/src/bubble-card.js index c787ce8..05f2b16 100644 --- a/src/bubble-card.js +++ b/src/bubble-card.js @@ -1,4 +1,4 @@ -var version = 'v1.2.3'; +var version = 'v1.2.4'; let editor; @@ -526,7 +526,7 @@ class BubbleCard extends HTMLElement { } } - if (entityId !== '') { + if (entityId && hass.states[entityId].attributes.rgb_color) { const rgbColor = hass.states[entityId].attributes.rgb_color; const rgbColorOpacity = rgbColor ? `rgba(${rgbColor[0]}, ${rgbColor[1]}, ${rgbColor[2]}, 0.5)` @@ -760,6 +760,8 @@ class BubbleCard extends HTMLElement { } } + createPopUp(); + let initPopUp; if (!this.popUp) { @@ -1011,7 +1013,7 @@ class BubbleCard extends HTMLElement { position: fixed; width: calc(${widthDesktop}${widthDesktopDivided[2] === '%' && !isSidebarHidden ? ' - var(--mdc-drawer-width)' : ''}) !important; left: calc(50% - ${widthDesktopDivided[1] / 2}${widthDesktopDivided[2]} + ${isSidebarHidden === true ? '0px' : `var(--mdc-drawer-width) ${widthDesktopDivided[2] === '%' ? '' : '/ 2'}`}); - margin-left: -18px !important; + margin-left: -13px !important; padding: 0 26px !important; } }