diff --git a/esphome/components/web_server_base/__init__.py b/esphome/components/web_server_base/__init__.py index 1970b5a0c5..4f894619b0 100644 --- a/esphome/components/web_server_base/__init__.py +++ b/esphome/components/web_server_base/__init__.py @@ -37,4 +37,4 @@ async def to_code(config): cg.add_library("FS", None) cg.add_library("Update", None) # https://github.com/esphome/ESPAsyncWebServer/blob/master/library.json - cg.add_library("esphome/ESPAsyncWebServer-esphome", "3.2.0") + cg.add_library("esphome/ESPAsyncWebServer-esphome", "3.2.2") diff --git a/esphome/const.py b/esphome/const.py index 0c53287909..ad5858dcf3 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2024.5.3" +__version__ = "2024.5.4" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" VALID_SUBSTITUTIONS_CHARACTERS = ( diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index fdc0eed774..dee771d4e9 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -433,6 +433,10 @@ int8_t step_to_accuracy_decimals(float step) { return str.length() - dot_pos - 1; } +static const std::string BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + static inline bool is_base64(char c) { return (isalnum(c) || (c == '+') || (c == '/')); } std::string base64_encode(const std::vector &buf) { return base64_encode(buf.data(), buf.size()); } diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 809e7d6767..4af840f77b 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -435,10 +435,6 @@ std::string value_accuracy_to_string(float value, int8_t accuracy_decimals); /// Derive accuracy in decimals from an increment step. int8_t step_to_accuracy_decimals(float step); -static const std::string BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - std::string base64_encode(const uint8_t *buf, size_t buf_len); std::string base64_encode(const std::vector &buf); diff --git a/platformio.ini b/platformio.ini index d342b32b02..67a631dda8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -58,7 +58,7 @@ lib_deps = SPI ; spi (Arduino built-in) Wire ; i2c (Arduino built-int) heman/AsyncMqttClient-esphome@1.0.0 ; mqtt - esphome/ESPAsyncWebServer-esphome@3.2.0 ; web_server_base + esphome/ESPAsyncWebServer-esphome@3.2.2 ; web_server_base fastled/FastLED@3.3.2 ; fastled_base mikalhart/TinyGPSPlus@1.0.2 ; gps freekode/TM1651@1.0.1 ; tm1651