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()