From 0017266e77e9954e906500412931eee873568f94 Mon Sep 17 00:00:00 2001 From: Richard H <5207490+genestealer@users.noreply.github.com> Date: Wed, 22 Jul 2026 14:55:23 +0100 Subject: [PATCH] Fix Envoy diagnostics fixture download on non-UTF-8 responses (#177008) --- homeassistant/components/enphase_envoy/diagnostics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/enphase_envoy/diagnostics.py b/homeassistant/components/enphase_envoy/diagnostics.py index 77d7c2a4dc97..d52c4c14e049 100644 --- a/homeassistant/components/enphase_envoy/diagnostics.py +++ b/homeassistant/components/enphase_envoy/diagnostics.py @@ -79,7 +79,9 @@ async def _get_fixture_collection(envoy: Envoy, serial: str) -> dict[str, Any]: try: response: ClientResponse = await envoy.request(end_point) fixture_data[end_point] = ( - (await response.text()).replace("\n", "").replace(serial, CLEAN_TEXT) + (await response.text(errors="replace")) + .replace("\n", "") + .replace(serial, CLEAN_TEXT) ) fixture_data[f"{end_point}_log"] = json_dumps( {