mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 05:12:21 +01:00
needs ifdef
This commit is contained in:
@@ -708,8 +708,11 @@ class APIConnection : public APIServerConnection {
|
|||||||
// 2. OR: We should try to send immediately (should_try_send_immediately = true)
|
// 2. OR: We should try to send immediately (should_try_send_immediately = true)
|
||||||
// AND Batch delay is 0 (user has opted in to immediate sending)
|
// AND Batch delay is 0 (user has opted in to immediate sending)
|
||||||
// 3. AND: Buffer has space available
|
// 3. AND: Buffer has space available
|
||||||
if ((message_type == UpdateStateResponse::MESSAGE_TYPE ||
|
if ((
|
||||||
(this->flags_.should_try_send_immediately && this->get_batch_delay_ms_() == 0)) &&
|
#ifdef USE_UPDATE
|
||||||
|
message_type == UpdateStateResponse::MESSAGE_TYPE ||
|
||||||
|
#endif
|
||||||
|
(this->flags_.should_try_send_immediately && this->get_batch_delay_ms_() == 0)) &&
|
||||||
this->helper_->can_write_without_blocking()) {
|
this->helper_->can_write_without_blocking()) {
|
||||||
// Now actually encode and send
|
// Now actually encode and send
|
||||||
if (creator(entity, this, MAX_BATCH_PACKET_SIZE, true) &&
|
if (creator(entity, this, MAX_BATCH_PACKET_SIZE, true) &&
|
||||||
|
Reference in New Issue
Block a user