Add support for an external step in config flow (#23782)
* Add support for an external step in config flow * Types * Lint
This commit is contained in:
parent
4214a354a7
commit
5888e32360
4 changed files with 129 additions and 11 deletions
|
@ -951,3 +951,16 @@ def mock_entity_platform(hass, platform_path, module):
|
|||
|
||||
_LOGGER.info("Adding mock integration platform: %s", platform_path)
|
||||
module_cache["{}.{}".format(platform_name, domain)] = module
|
||||
|
||||
|
||||
def async_capture_events(hass, event_name):
|
||||
"""Create a helper that captures events."""
|
||||
events = []
|
||||
|
||||
@ha.callback
|
||||
def capture_events(event):
|
||||
events.append(event)
|
||||
|
||||
hass.bus.async_listen(event_name, capture_events)
|
||||
|
||||
return events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue