From 70479dec0d1ffd33f8c510939519e0329cbb3ba3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 18 Oct 2025 21:57:19 -1000 Subject: [PATCH] suggestions --- esphome/components/script/script.h | 3 +-- tests/integration/test_script_queued.py | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/esphome/components/script/script.h b/esphome/components/script/script.h index a69049840f..84e1e95bf4 100644 --- a/esphome/components/script/script.h +++ b/esphome/components/script/script.h @@ -116,8 +116,7 @@ template class QueueingScript : public Script, public Com // max_runs_ is the maximum *total* instances (running + queued) // So we reject when num_queued_ + 1 >= max_runs_ (queued + running >= max) if (this->num_queued_ + 1 >= this->max_runs_) { - this->esp_logw_(__LINE__, - ESPHOME_LOG_FORMAT("Script '%s' maximum total instances (running + queued) exceeded!"), + this->esp_logw_(__LINE__, ESPHOME_LOG_FORMAT("Script '%s' max instances (running + queued) reached!"), LOG_STR_ARG(this->name_)); return; } diff --git a/tests/integration/test_script_queued.py b/tests/integration/test_script_queued.py index 9afaaf3286..ce1c25b649 100644 --- a/tests/integration/test_script_queued.py +++ b/tests/integration/test_script_queued.py @@ -31,9 +31,7 @@ async def test_script_queued( # Patterns for Test 1: Queue depth queue_start = re.compile(r"Queue test: START item (\d+)") queue_end = re.compile(r"Queue test: END item (\d+)") - queue_reject = re.compile( - r"Script 'queue_depth_script' maximum total instances \(running \+ queued\) exceeded!" - ) + queue_reject = re.compile(r"Script 'queue_depth_script' max instances") # Patterns for Test 2: Ring buffer ring_start = re.compile(r"Ring buffer: START '([A-Z])'") @@ -46,9 +44,7 @@ async def test_script_queued( # Patterns for Test 4: Rejection reject_start = re.compile(r"Rejection test: START (\d+)") reject_end = re.compile(r"Rejection test: END (\d+)") - reject_reject = re.compile( - r"Script 'rejection_script' maximum total instances \(running \+ queued\) exceeded!" - ) + reject_reject = re.compile(r"Script 'rejection_script' max instances") # Patterns for Test 5: No params no_params_end = re.compile(r"No params: END")