Skip to content

Commit

Permalink
v1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Clooos authored Oct 15, 2023
1 parent 1b58156 commit 2443e18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/bubble-card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var version = 'v1.2.3';
var version = 'v1.2.4';

let editor;

Expand Down Expand Up @@ -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)`
Expand Down Expand Up @@ -760,6 +760,8 @@ class BubbleCard extends HTMLElement {
}
}

createPopUp();

let initPopUp;

if (!this.popUp) {
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2443e18

Please sign in to comment.