diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index c9566c5d16..bbb32a53bd 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -77,7 +77,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 @@ -288,6 +287,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