diff --git a/components/ups_hid/protocol_factory.cpp b/components/ups_hid/protocol_factory.cpp index f512b44..94ab6c2 100644 --- a/components/ups_hid/protocol_factory.cpp +++ b/components/ups_hid/protocol_factory.cpp @@ -26,6 +26,7 @@ void ProtocolFactory::ensure_initialized() { // Registries are initialized on first access due to static storage // This function exists for explicit initialization if needed static bool initialized = false; + if (!initialized) { if (esphome::logger::global_logger != nullptr) ESP_LOGD(FACTORY_TAG, "Protocol factory registries initialized"); initialized = true;