Bump to aiohttp 3.8.0 (#58974)
This commit is contained in:
parent
23cb396aad
commit
10d6247fee
106 changed files with 221 additions and 142 deletions
|
@ -476,7 +476,10 @@ class _ScriptRun:
|
|||
def async_script_wait(entity_id, from_s, to_s):
|
||||
"""Handle script after template condition is true."""
|
||||
wait_var = self._variables["wait"]
|
||||
wait_var["remaining"] = to_context.remaining if to_context else timeout
|
||||
if to_context and to_context.deadline:
|
||||
wait_var["remaining"] = to_context.deadline - self._hass.loop.time()
|
||||
else:
|
||||
wait_var["remaining"] = timeout
|
||||
wait_var["completed"] = True
|
||||
done.set()
|
||||
|
||||
|
@ -777,7 +780,10 @@ class _ScriptRun:
|
|||
|
||||
async def async_done(variables, context=None):
|
||||
wait_var = self._variables["wait"]
|
||||
wait_var["remaining"] = to_context.remaining if to_context else timeout
|
||||
if to_context and to_context.deadline:
|
||||
wait_var["remaining"] = to_context.deadline - self._hass.loop.time()
|
||||
else:
|
||||
wait_var["remaining"] = timeout
|
||||
wait_var["trigger"] = variables["trigger"]
|
||||
done.set()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue