mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 23:21:54 +00:00 
			
		
		
		
	preen
This commit is contained in:
		| @@ -1824,6 +1824,7 @@ uint16_t APIConnection::try_send_ping_request(EntityBase *entity, APIConnection | |||||||
|   return encode_message_to_buffer(req, PingRequest::MESSAGE_TYPE, conn, remaining_size, is_single); |   return encode_message_to_buffer(req, PingRequest::MESSAGE_TYPE, conn, remaining_size, is_single); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #ifdef USE_API_HOMEASSISTANT_STATES | ||||||
| void APIConnection::process_state_subscriptions_() { | void APIConnection::process_state_subscriptions_() { | ||||||
|   const auto &subs = this->parent_->get_state_subs(); |   const auto &subs = this->parent_->get_state_subs(); | ||||||
|   if (this->state_subs_at_ >= static_cast<int>(subs.size())) { |   if (this->state_subs_at_ >= static_cast<int>(subs.size())) { | ||||||
| @@ -1843,6 +1844,7 @@ void APIConnection::process_state_subscriptions_() { | |||||||
|     this->state_subs_at_++; |     this->state_subs_at_++; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | #endif  // USE_API_HOMEASSISTANT_STATES | ||||||
|  |  | ||||||
| }  // namespace esphome::api | }  // namespace esphome::api | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -292,8 +292,10 @@ class APIConnection : public APIServerConnection { | |||||||
|   // Helper function to handle authentication completion |   // Helper function to handle authentication completion | ||||||
|   void complete_authentication_(); |   void complete_authentication_(); | ||||||
|  |  | ||||||
|  | #ifdef USE_API_HOMEASSISTANT_STATES | ||||||
|   // Process state subscriptions efficiently |   // Process state subscriptions efficiently | ||||||
|   void process_state_subscriptions_(); |   void process_state_subscriptions_(); | ||||||
|  | #endif  // USE_API_HOMEASSISTANT_STATES | ||||||
|  |  | ||||||
|   // Non-template helper to encode any ProtoMessage |   // Non-template helper to encode any ProtoMessage | ||||||
|   static uint16_t encode_message_to_buffer(ProtoMessage &msg, uint8_t message_type, APIConnection *conn, |   static uint16_t encode_message_to_buffer(ProtoMessage &msg, uint8_t message_type, APIConnection *conn, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user