diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 70f73f065ab..9c27b09b6f6 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -988,7 +988,7 @@ class _ScriptRun: async def async_run_with_trace(idx: int, script: Script) -> None: """Run a script with a trace path.""" trace_path_stack_cv.set(copy(trace_path_stack_cv.get())) - with trace_path([str(idx), "sequence"]): + with trace_path([str(idx)]): await self._async_run_script(script) results = await asyncio.gather( diff --git a/tests/helpers/test_script.py b/tests/helpers/test_script.py index fb3b021daec..5482fbd0670 100644 --- a/tests/helpers/test_script.py +++ b/tests/helpers/test_script.py @@ -3012,7 +3012,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) - expected_trace = { "0": [{"result": {}}], - "0/parallel/0/sequence/0": [ + "0/parallel/0/0": [ { "result": { "wait": { @@ -3025,7 +3025,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) - } } ], - "0/parallel/1/sequence/0": [ + "0/parallel/1/0": [ { "variables": {"wait": {"remaining": None}}, "result": { @@ -3034,7 +3034,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) - }, } ], - "0/parallel/0/sequence/1": [ + "0/parallel/0/1": [ { "variables": {"wait": {"remaining": None}}, "result": { @@ -3068,7 +3068,7 @@ async def test_parallel_error( expected_trace = { "0": [{"error_type": ServiceNotFound, "result": {}}], - "0/parallel/0/sequence/0": [ + "0/parallel/0/0": [ { "error_type": ServiceNotFound, "result": {