diff --git a/esphome/components/mqtt/mqtt_client.cpp b/esphome/components/mqtt/mqtt_client.cpp index 0acbbf3eb5..5793f63e2a 100644 --- a/esphome/components/mqtt/mqtt_client.cpp +++ b/esphome/components/mqtt/mqtt_client.cpp @@ -404,7 +404,7 @@ void MQTTClientComponent::loop() { { uint8_t resend_count = 0; for (MQTTComponent *component : this->children_) { - if (component->resend_pending()) { + if (component->is_resend_pending()) { component->process_resend(); if (++resend_count >= MAX_RESENDS_PER_LOOP) break; diff --git a/esphome/components/mqtt/mqtt_component.h b/esphome/components/mqtt/mqtt_component.h index a8afe75504..7983e04870 100644 --- a/esphome/components/mqtt/mqtt_component.h +++ b/esphome/components/mqtt/mqtt_component.h @@ -148,7 +148,7 @@ class MQTTComponent : public Component { void schedule_resend_state(); /// Check if a resend is pending (called by MQTTClientComponent to rate-limit work) - bool resend_pending() const { return this->resend_state_; } + bool is_resend_pending() const { return this->resend_state_; } /// Process pending resend if needed (called by MQTTClientComponent) void process_resend();