Pre import mobile app platforms to avoid having to wait on them (#113966)

This commit is contained in:
J. Nick Koston 2024-03-21 15:40:15 -10:00 committed by GitHub
parent b2cab70cc0
commit 5b9f40b0f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,16 @@ from homeassistant.helpers import (
from homeassistant.helpers.storage import Store
from homeassistant.helpers.typing import ConfigType
from . import websocket_api
# Pre-import the platforms so they get loaded when the integration
# is imported as they are almost always going to be loaded and its
# cheaper to import them all at once.
from . import ( # noqa: F401
binary_sensor as binary_sensor_pre_import,
device_tracker as device_tracker_pre_import,
notify as notify_pre_import,
sensor as sensor_pre_import,
websocket_api,
)
from .const import (
ATTR_DEVICE_NAME,
ATTR_MANUFACTURER,