From c11d950a979f1045ff8d1af9c928fa58a628b1e2 Mon Sep 17 00:00:00 2001 From: almirus Date: Tue, 16 Jul 2024 11:37:17 +0300 Subject: [PATCH] Added centering of image from video stream (#21155) --- src/panels/lovelace/cards/hui-picture-entity-card.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-picture-entity-card.ts b/src/panels/lovelace/cards/hui-picture-entity-card.ts index efded2eb6d0d..548e16aeed72 100644 --- a/src/panels/lovelace/cards/hui-picture-entity-card.ts +++ b/src/panels/lovelace/cards/hui-picture-entity-card.ts @@ -183,7 +183,16 @@ class HuiPictureEntityCard extends LitElement implements LovelaceCard { cursor: pointer; height: 100%; } - + + ha-camera-stream img { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + min-height: 100%; + min-width: 100%; + } + .footer { /* start paper-font-common-nowrap style */ white-space: nowrap;