diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index bdfbdf31c2..becde9af7d 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -14,10 +14,6 @@ #include "esphome/core/optional.h" -namespace esphome { -class StringRef; -} - #ifdef USE_ESP8266 #include #endif @@ -49,6 +45,9 @@ class StringRef; namespace esphome { +// Forward declaration to avoid circular dependency with string_ref.h +class StringRef; + /// @name STL backports ///@{