From 54f28f7719dc5c32125c28a285ad070e1abb110b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 21 Nov 2023 00:16:01 +0100 Subject: [PATCH] adjust tests --- esphome/core/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index 2adda076f4..549734d974 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -282,7 +282,7 @@ std::string str_sanitize(const std::string &str) { std::replace_if( str.begin(), str.end(), [](const char &c) { - return c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + return !(c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')); }, '_'); return out;