Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Clooos authored Nov 8, 2023
1 parent 14a9f5a commit 812b6fb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/bubble-card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var version = 'v1.4.2';
var version = 'v1.4.3';

let editor;
let entityStates = {};
Expand Down Expand Up @@ -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') :
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 812b6fb

Please sign in to comment.