From 95920ba710248ba284c79792bc4b3dcf85306f79 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 31 Jan 2024 18:48:45 +0100 Subject: [PATCH] Default to error correction Q when there is a center image (#19593) default to error correction Q when there is a center image --- src/components/ha-qr-code.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ha-qr-code.ts b/src/components/ha-qr-code.ts index 807247036f..47190c180c 100644 --- a/src/components/ha-qr-code.ts +++ b/src/components/ha-qr-code.ts @@ -67,7 +67,8 @@ export class HaQrCode extends LitElement { const computedStyles = getComputedStyle(this); QRCode.toCanvas(canvas, this.data, { - errorCorrectionLevel: this.errorCorrectionLevel, + errorCorrectionLevel: + this.errorCorrectionLevel || (this.centerImage ? "Q" : "M"), width: this.width, scale: this.scale, margin: this.margin,