From 8c185254ef5615808acdfde082eae7d3ee604130 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 17 Dec 2025 13:04:46 -1000 Subject: [PATCH] give 6 months of get_compilation_time for back compat --- esphome/core/application.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/esphome/core/application.h b/esphome/core/application.h index 9d876dc5a3..f462553a81 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -280,6 +280,15 @@ class Application { /// Buffer must be BUILD_TIME_STR_SIZE bytes (compile-time enforced) void get_build_time_string(std::span buffer); + /// Get the build time as a string (deprecated, use get_build_time_string() instead) + // Remove before 2026.7.0 + ESPDEPRECATED("Use get_build_time_string() instead. Removed in 2026.7.0", "2026.1.0") + std::string get_compilation_time() { + char buf[BUILD_TIME_STR_SIZE]; + this->get_build_time_string(buf); + return std::string(buf); + } + /// Get the cached time in milliseconds from when the current component started its loop execution inline uint32_t IRAM_ATTR HOT get_loop_component_start_time() const { return this->loop_component_start_time_; }