MQTT convert to async (#6064)
* Migrate mqtt to async * address paulus comment / convert it complet async * adress paulus comment / remove future * Automation triggers should be async * Fix MQTT async calls * Show that event helpers are callbacks * Fix tests * Lint
This commit is contained in:
parent
fa2c1dafdf
commit
e1cbd6b4c0
25 changed files with 356 additions and 231 deletions
|
@ -86,7 +86,13 @@ def async_test_home_assistant(loop):
|
|||
loop._thread_ident = threading.get_ident()
|
||||
|
||||
hass = ha.HomeAssistant(loop)
|
||||
hass.async_track_tasks()
|
||||
|
||||
def async_add_job(target, *args):
|
||||
if isinstance(target, MagicMock):
|
||||
return
|
||||
hass._async_add_job_tracking(target, *args)
|
||||
|
||||
hass.async_add_job = async_add_job
|
||||
|
||||
hass.config.location_name = 'test home'
|
||||
hass.config.config_dir = get_test_config_dir()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue