From 62629a0b343ddd947363f83e25fa3c15276841db Mon Sep 17 00:00:00 2001 From: Shai Ungar Date: Mon, 30 Sep 2024 10:17:44 +0300 Subject: [PATCH] Fix repair when integration does not exist (#127050) --- homeassistant/components/seventeentrack/repairs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/seventeentrack/repairs.py b/homeassistant/components/seventeentrack/repairs.py index 71616e98506bb6..ce72960ea91c4f 100644 --- a/homeassistant/components/seventeentrack/repairs.py +++ b/homeassistant/components/seventeentrack/repairs.py @@ -42,8 +42,8 @@ async def async_create_fix_flow( hass: HomeAssistant, issue_id: str, data: dict ) -> RepairsFlow: """Create flow.""" - if issue_id.startswith("deprecate_sensor_"): - entry = hass.config_entries.async_get_entry(data["entry_id"]) - assert entry + if issue_id.startswith("deprecate_sensor_") and ( + entry := hass.config_entries.async_get_entry(data["entry_id"]) + ): return SensorDeprecationRepairFlow(entry) return ConfirmRepairFlow()