diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index 4691c177354..5805b5d5103 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -78,7 +78,6 @@ class APIConnection final : public APIServerConnection { #endif #ifdef USE_CAMERA void set_camera_state(std::shared_ptr image); - void try_send_camera_image_(); void camera_image(const CameraImageRequest &msg) override; #endif #ifdef USE_CLIMATE @@ -298,6 +297,10 @@ class APIConnection final : public APIServerConnection { // Helper function to handle authentication completion void complete_authentication_(); +#ifdef USE_CAMERA + void try_send_camera_image_(); +#endif + #ifdef USE_API_HOMEASSISTANT_STATES void process_state_subscriptions_(); #endif