Make automation async

This commit is contained in:
Paulus Schoutsen committed 2016-10-01 14:11:16 -07:00
1 parent 16ff68ca84
commit 7ab7edd81c
19 files changed
+205 -346

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
"""Offer reusable conditions."""
from datetime import timedelta
import functools as ft
import logging
import sys
@@ -30,6 +31,7 @@ _LOGGER = logging.getLogger(__name__)
def _threaded_factory(async_factory):
"""Helper method to create threaded versions of async factories."""
@ft.wraps(async_factory)
def factory(config, config_validation=True):
"""Threaded factory."""
async_check = async_factory(config, config_validation)