diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 96f9b2d5069..ac53a3e32a2 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -95,7 +95,7 @@ class Script(): def async_script_delay(now): """Handle delay.""" # pylint: disable=cell-var-from-loop - self._async_listener.remove(unsub) + self._async_remove_listener() self.hass.async_create_task( self.async_run(variables, context)) @@ -240,7 +240,7 @@ class Script(): @callback def async_script_timeout(now): """Call after timeout is retrieve.""" - self._async_listener.remove(unsub) + self._async_remove_listener() # Check if we want to continue to execute # the script after the timeout