diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index 6f213936447..8136806cd0b 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -27,6 +27,7 @@ from homeassistant.helpers.dispatcher import ( from homeassistant.helpers.entity import Entity from homeassistant.helpers.event import async_track_time_interval from homeassistant.helpers.typing import ConfigType +from homeassistant.loader import async_get_loaded_integration from .config_flow import SmartThingsFlowHandler # noqa: F401 from .const import ( @@ -104,6 +105,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: api = SmartThings(async_get_clientsession(hass), entry.data[CONF_ACCESS_TOKEN]) + # Ensure platform modules are loaded since the DeviceBroker will + # import them below and we want them to be cached ahead of time + # so the integration does not do blocking I/O in the event loop + # to import the modules. + await async_get_loaded_integration(hass, DOMAIN).async_get_platforms(PLATFORMS) + remove_entry = False try: # See if the app is already setup. This occurs when there are