From 63e30123805384214420a18eeb25e5e630f68b21 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 26 Mar 2021 23:56:40 -0700 Subject: [PATCH] Fix script default trace (#48390) --- homeassistant/helpers/script.py | 2 +- tests/helpers/test_script.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 3df5be09f13..aa092ea2c8c 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -737,7 +737,7 @@ class _ScriptRun: if choose_data["default"]: trace_set_result(choice="default") - with trace_path(["default", "sequence"]): + with trace_path(["default"]): await self._async_run_script(choose_data["default"]) async def _async_wait_for_trigger_step(self): diff --git a/tests/helpers/test_script.py b/tests/helpers/test_script.py index 917fc64b0e7..e4170ccae20 100644 --- a/tests/helpers/test_script.py +++ b/tests/helpers/test_script.py @@ -2059,7 +2059,7 @@ async def test_choose(hass, caplog, var, result): {"result": {"event": "test_event", "event_data": {"choice": "second"}}} ] if var == 3: - expected_trace["0/default/sequence/0"] = [ + expected_trace["0/default/0"] = [ {"result": {"event": "test_event", "event_data": {"choice": "default"}}} ] assert_action_trace(expected_trace)