1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Don't block startup more than 60 seconds while waiting for components. (#7739)

This commit is contained in:
Anton Sarukhanov
2017-05-23 14:29:27 -07:00
committed by Paulus Schoutsen
parent fce09f624b
commit 7055fddfb4
3 changed files with 40 additions and 6 deletions

View File

@@ -317,7 +317,7 @@ class MockPlatform(object):
# pylint: disable=invalid-name
def __init__(self, setup_platform=None, dependencies=None,
platform_schema=None):
platform_schema=None, async_setup_platform=None):
"""Initialize the platform."""
self.DEPENDENCIES = dependencies or []
self._setup_platform = setup_platform
@@ -325,6 +325,9 @@ class MockPlatform(object):
if platform_schema is not None:
self.PLATFORM_SCHEMA = platform_schema
if async_setup_platform is not None:
self.async_setup_platform = async_setup_platform
def setup_platform(self, hass, config, add_devices, discovery_info=None):
"""Set up the platform."""
if self._setup_platform is not None: