From 1dbe1955eb289a317661dd792e24ee5a2f350714 Mon Sep 17 00:00:00 2001 From: TheOneValen <4579392+TheOneValen@users.noreply.github.com> Date: Wed, 21 May 2025 17:18:34 +0200 Subject: [PATCH] Allow image send with read-only access (matrix notify) (#144819) --- homeassistant/components/matrix/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/matrix/__init__.py b/homeassistant/components/matrix/__init__.py index 8640aa4d074..5123436a397 100644 --- a/homeassistant/components/matrix/__init__.py +++ b/homeassistant/components/matrix/__init__.py @@ -475,7 +475,7 @@ class MatrixBot: file_stat = await aiofiles.os.stat(image_path) _LOGGER.debug("Uploading file from path, %s", image_path) - async with aiofiles.open(image_path, "r+b") as image_file: + async with aiofiles.open(image_path, "rb") as image_file: response, _ = await self._client.upload( image_file, content_type=mime_type,