diff --git a/esphome/components/ota/ota_backend_factory.h b/esphome/components/ota/ota_backend_factory.h index b6456e64fc2..205c1ebf8ee 100644 --- a/esphome/components/ota/ota_backend_factory.h +++ b/esphome/components/ota/ota_backend_factory.h @@ -2,6 +2,8 @@ #include "ota_backend.h" +#include + #ifdef USE_ESP8266 #include "ota_backend_esp8266.h" #elif defined(USE_ESP32) @@ -12,6 +14,10 @@ #include "ota_backend_arduino_libretiny.h" #elif defined(USE_HOST) #include "ota_backend_host.h" +#else +// Stub for static analysis when no platform is defined +namespace esphome::ota { +struct StubOTABackend {}; +std::unique_ptr make_ota_backend(); +} // namespace esphome::ota #endif - -namespace esphome::ota {} // namespace esphome::ota