diff --git a/src/components/ha-qr-code.ts b/src/components/ha-qr-code.ts index 47190c180c36..bf95b70aa0d9 100644 --- a/src/components/ha-qr-code.ts +++ b/src/components/ha-qr-code.ts @@ -64,8 +64,6 @@ export class HaQrCode extends LitElement { changedProperties.has("errorCorrectionLevel") || changedProperties.has("centerImage")) ) { - const computedStyles = getComputedStyle(this); - QRCode.toCanvas(canvas, this.data, { errorCorrectionLevel: this.errorCorrectionLevel || (this.centerImage ? "Q" : "M"), @@ -74,8 +72,7 @@ export class HaQrCode extends LitElement { margin: this.margin, maskPattern: this.maskPattern, color: { - light: computedStyles.getPropertyValue("--card-background-color"), - dark: computedStyles.getPropertyValue("--primary-text-color"), + light: "#fff", }, }).catch((err) => { this._error = err.message;