From 9a1aba967f5b25937d8924cf8c982e66efc13b29 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 29 Aug 2024 11:00:12 +0200 Subject: [PATCH] Prevent system commands to interfere with interactive setup --- firmware/addons/interactive-setup.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/addons/interactive-setup.yaml b/firmware/addons/interactive-setup.yaml index f066bb9..52a6e70 100644 --- a/firmware/addons/interactive-setup.yaml +++ b/firmware/addons/interactive-setup.yaml @@ -84,7 +84,12 @@ tcs_intercom: - if: condition: - lambda: |- - return id(interactive_setup_step) == "first_door_opener_command"; + std::string str = std::string(x.c_str()); + if (str.length() > 5) + { + str.erase(5); // Ingore system commands + } + return id(interactive_setup_step) == "first_door_opener_command" && str != "00005" && str != "00002" && str != "00003"; then: # Save Command - lambda: |-