From a7c2d96ecf2f3c8fa1c72417e24c5acf5055c45c Mon Sep 17 00:00:00 2001
From: tronikos <tronikos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 00:13:51 -0800
Subject: [PATCH] Avoid KeyError for ignored entries in async_step_zeroconf of
 Android TV Remote (#134250)

---
 homeassistant/components/androidtv_remote/config_flow.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/homeassistant/components/androidtv_remote/config_flow.py b/homeassistant/components/androidtv_remote/config_flow.py
index 3500e4ff47b..4df25247881 100644
--- a/homeassistant/components/androidtv_remote/config_flow.py
+++ b/homeassistant/components/androidtv_remote/config_flow.py
@@ -156,7 +156,12 @@ class AndroidTVRemoteConfigFlow(ConfigFlow, domain=DOMAIN):
         # and one of them, which could end up being in discovery_info.host, is from a
         # different device. If any of the discovery_info.ip_addresses matches the
         # existing host, don't update the host.
-        if existing_config_entry and len(discovery_info.ip_addresses) > 1:
+        if (
+            existing_config_entry
+            # Ignored entries don't have host
+            and CONF_HOST in existing_config_entry.data
+            and len(discovery_info.ip_addresses) > 1
+        ):
             existing_host = existing_config_entry.data[CONF_HOST]
             if existing_host != self.host:
                 if existing_host in [
-- 
GitLab