Fix script / automation repeat with count 0 fails (#65448)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
mk-maddin 2022-02-03 17:18:58 +01:00 committed by GitHub
parent 778cc6106a
commit efb6fd1569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 1 deletions

View file

@ -742,7 +742,7 @@ class _ScriptRun:
if saved_repeat_vars:
self._variables["repeat"] = saved_repeat_vars
else:
del self._variables["repeat"]
self._variables.pop("repeat", None) # Not set if count = 0
async def _async_choose_step(self) -> None:
"""Choose a sequence."""