mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 18:04:19 -07:00
[component] Devirtualize call_dump_config (#14355)
This commit is contained in:
@@ -405,12 +405,6 @@ void MQTTComponent::process_resend() {
|
||||
this->schedule_resend_state();
|
||||
}
|
||||
}
|
||||
void MQTTComponent::call_dump_config() {
|
||||
if (this->is_internal())
|
||||
return;
|
||||
|
||||
this->dump_config();
|
||||
}
|
||||
void MQTTComponent::schedule_resend_state() { this->resend_state_ = true; }
|
||||
bool MQTTComponent::is_connected_() const { return global_mqtt_client->is_connected(); }
|
||||
|
||||
|
||||
@@ -98,8 +98,6 @@ class MQTTComponent : public Component {
|
||||
/// Override setup_ so that we can call send_discovery() when needed.
|
||||
void call_setup() override;
|
||||
|
||||
void call_dump_config() override;
|
||||
|
||||
/// Send discovery info the Home Assistant, override this.
|
||||
virtual void send_discovery(JsonObject root, SendDiscoveryConfig &config) = 0;
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ void Application::process_dump_config_() {
|
||||
#endif
|
||||
}
|
||||
|
||||
this->components_[this->dump_config_at_]->call_dump_config();
|
||||
this->components_[this->dump_config_at_]->call_dump_config_();
|
||||
this->dump_config_at_++;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ bool Component::cancel_retry(uint32_t id) {
|
||||
|
||||
void Component::call_loop_() { this->loop(); }
|
||||
void Component::call_setup() { this->setup(); }
|
||||
void Component::call_dump_config() {
|
||||
void Component::call_dump_config_() {
|
||||
this->dump_config();
|
||||
if (this->is_failed()) {
|
||||
// Look up error message from global vector
|
||||
|
||||
@@ -291,7 +291,7 @@ class Component {
|
||||
|
||||
void call_loop_();
|
||||
virtual void call_setup();
|
||||
virtual void call_dump_config();
|
||||
void call_dump_config_();
|
||||
|
||||
/// Helper to set component state (clears state bits and sets new state)
|
||||
void set_component_state_(uint8_t state);
|
||||
|
||||
Reference in New Issue
Block a user