diff --git a/esphome/components/espnow/espnow.cpp b/esphome/components/espnow/espnow.cpp index 7ae6533daa..a6220d9786 100644 --- a/esphome/components/espnow/espnow.cpp +++ b/esphome/components/espnow/espnow.cpp @@ -373,7 +373,7 @@ void ESPNowComponent::on_data_sent(const uint8_t *mac_addr, esp_now_send_status_ ESP_LOGE(TAG, "sent packet failed (0x%04x.%d)", packet.ref_id, packet.retrys); } else if (packet.mac64 != mac64) { ESP_LOGE(TAG, " Invalid mac address. (0x%04x.%d) expected: %s got %s", packet.ref_id, packet.retrys, - packet.to_str().c_str(), packet.to_str(mac64)); + packet.to_str().c_str(), packet.to_str(mac64).c_str()); } else { ESP_LOGV(TAG, "Confirm sent (0x%04x.%d)", packet.ref_id, packet.retrys); global_esp_now->unlock(); diff --git a/esphome/components/espnow/espnow_packet.c b/esphome/components/espnow/espnow_packet.c index 001a7c51c9..3dbcdda2b5 100644 --- a/esphome/components/espnow/espnow_packet.c +++ b/esphome/components/espnow/espnow_packet.c @@ -1,6 +1,6 @@ -#include "espnow_packet.h" -#if defined(USE_ESP32) +#if defined(USE_ESP32) +#include "espnow_packet.h" #include "esphome/core/log.h" static const char *const TAG = "espnow_packet";