Bump to aiohttp 3.8.0 (#58974)

This commit is contained in:
J. Nick Koston 2021-11-04 10:07:50 -05:00 committed by GitHub
parent 23cb396aad
commit 10d6247fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
106 changed files with 221 additions and 142 deletions

View file

@ -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()