diff --git a/esphome/components/api/api_outgoing_connection.cpp b/esphome/components/api/api_outgoing_connection.cpp index da88db1e6c..34966a9b44 100644 --- a/esphome/components/api/api_outgoing_connection.cpp +++ b/esphome/components/api/api_outgoing_connection.cpp @@ -9,6 +9,7 @@ #include "esphome/core/log.h" #include +#include #include namespace esphome::api { @@ -228,7 +229,7 @@ void OutgoingConnectionManager::dump_config() const { ESP_LOGCONFIG(TAG, " Outgoing connection port: %u\n" " Outgoing connection host: %s\n" - " Outgoing connection boot delay: %ums", + " Outgoing connection boot delay: %" PRIu32 "ms", API_OUTGOING_CONNECTION_PORT, host, BOOT_WAIT_MS); } diff --git a/esphome/components/udp/udp_component.cpp b/esphome/components/udp/udp_component.cpp index eeb8ba85cb..6af4c56e47 100644 --- a/esphome/components/udp/udp_component.cpp +++ b/esphome/components/udp/udp_component.cpp @@ -19,9 +19,9 @@ void UDPComponent::setup() { } this->sockaddrs_.push_back(saddr); } - if (!this->addresses_.empty() && this->sockaddrs_.empty()) { - // Sending would be a silent no-op; surface the misconfiguration - this->status_set_warning(LOG_STR("no valid addresses")); + if (this->sockaddrs_.size() != this->addresses_.size()) { + // A dropped address silently receives nothing; surface the misconfiguration + this->status_set_warning(LOG_STR("invalid address")); } // set up broadcast socket if (this->should_broadcast_) {