Reduce API component memory usage with conditional compilation (#9262)

This commit is contained in:
J. Nick Koston
2025-06-30 15:33:35 +12:00
committed by GitHub
parent 7f8dd4b254
commit 6a354d7c94
7 changed files with 338 additions and 17 deletions
@@ -1511,7 +1511,9 @@ ConnectResponse APIConnection::connect(const ConnectRequest &msg) {
if (correct) {
ESP_LOGD(TAG, "%s connected", this->get_client_combined_info().c_str());
this->flags_.connection_state = static_cast<uint8_t>(ConnectionState::AUTHENTICATED);
#ifdef USE_API_CLIENT_CONNECTED_TRIGGER
this->parent_->get_client_connected_trigger()->trigger(this->client_info_, this->client_peername_);
#endif
#ifdef USE_HOMEASSISTANT_TIME
if (homeassistant::global_homeassistant_time != nullptr) {
this->send_time_request();