From 907893775d12d4fe4de2243713eb59c76b6e9b9c Mon Sep 17 00:00:00 2001 From: Xyzianz <5629594+xyzianz@users.noreply.github.com> Date: Thu, 12 Mar 2026 15:22:09 +0100 Subject: [PATCH 1/2] Fix #5154 by checking if integration is not none and handling edge case accordingly --- custom_components/hacs/repairs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/hacs/repairs.py b/custom_components/hacs/repairs.py index 0b9ecb8f8a6..aea676a3543 100644 --- a/custom_components/hacs/repairs.py +++ b/custom_components/hacs/repairs.py @@ -36,12 +36,13 @@ async def async_step_confirm_restart( return self.async_create_entry(title="", data={}) hacs: HacsBase = self.hass.data[DOMAIN] - integration = hacs.repositories.get_by_id(self.issue_id.split("_")[2]) + integration_id = (self.issue_id.split("_")[2] + integration = hacs.repositories.get_by_id(integration_id) return self.async_show_form( step_id="confirm_restart", data_schema=vol.Schema({}), - description_placeholders={"name": integration.display_name}, + description_placeholders={"name": integration.display_name if integration is not None else integration_id}, ) From d219b01ccf6a09e5704491a12a7f8f361aa39205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 16 Mar 2026 08:15:23 +0100 Subject: [PATCH 2/2] Apply suggestion from @ludeeus --- custom_components/hacs/repairs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/hacs/repairs.py b/custom_components/hacs/repairs.py index aea676a3543..d952e95c2f9 100644 --- a/custom_components/hacs/repairs.py +++ b/custom_components/hacs/repairs.py @@ -36,7 +36,7 @@ async def async_step_confirm_restart( return self.async_create_entry(title="", data={}) hacs: HacsBase = self.hass.data[DOMAIN] - integration_id = (self.issue_id.split("_")[2] + integration_id = self.issue_id.split("_")[2] integration = hacs.repositories.get_by_id(integration_id) return self.async_show_form(