diff --git a/esphome/components/web_server/web_server.cpp b/esphome/components/web_server/web_server.cpp index fe36d6c2ce..3c244e9666 100644 --- a/esphome/components/web_server/web_server.cpp +++ b/esphome/components/web_server/web_server.cpp @@ -7,7 +7,10 @@ #include "StreamString.h" #include + +#ifdef USE_LOGGER #include +#endif namespace esphome { namespace web_server {