From 48c30463ec641dbf5c9539e2abf9a63cb4262262 Mon Sep 17 00:00:00 2001 From: James Mackay Date: Thu, 8 Oct 2026 09:04:13 +0100 Subject: [PATCH] fix: await the async ADB poller-factory builder during entry setup (keeps setup non-blocking, no ConfigEntryNotReady) --- custom_components/nvidia_shield/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/nvidia_shield/__init__.py b/custom_components/nvidia_shield/__init__.py index 6508abc..c68380e 100644 --- a/custom_components/nvidia_shield/__init__.py +++ b/custom_components/nvidia_shield/__init__.py @@ -27,7 +27,7 @@ _LOGGER = logging.getLogger(__name__) PLATFORMS = [Platform.MEDIA_PLAYER, Platform.SENSOR, Platform.BUTTON] -def _build_poller_factory(hass: HomeAssistant, entry: ConfigEntry): +async def _build_poller_factory(hass: HomeAssistant, entry: ConfigEntry): """Poller factory when ADB is configured AND usable today, else None. Returning None leaves the manager passive: the entry still sets up, the @@ -69,7 +69,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: hass.data[DOMAIN][entry.entry_id] = entry manager = ShieldConnectionManager( - hass, entry, poller_factory=_build_poller_factory(hass, entry) + hass, entry, poller_factory=await _build_poller_factory(hass, entry) ) entry.runtime_data = manager await manager.async_start()