From 34c0e0f58dacb6317c1ef435cdeb84328f98ab38 Mon Sep 17 00:00:00 2001 From: square99 Date: Wed, 23 Sep 2020 00:34:23 +0900 Subject: [PATCH] Fix proxy camera conversion with PNG Alpha(RGBA) (#40446) --- homeassistant/components/proxy/camera.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/proxy/camera.py b/homeassistant/components/proxy/camera.py index 754f09fa199..c3f7151431a 100644 --- a/homeassistant/components/proxy/camera.py +++ b/homeassistant/components/proxy/camera.py @@ -77,6 +77,8 @@ def _precheck_image(image, opts): if imgfmt not in ("PNG", "JPEG"): _LOGGER.warning("Image is of unsupported type: %s", imgfmt) raise ValueError() + if not img.mode == "RGB": + img = img.convert("RGB") return img