mirror of
https://github.com/esphome/esphome.git
synced 2025-10-15 00:03:51 +01:00
move callback
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace esphome::api {
|
namespace esphome::api {
|
||||||
|
|
||||||
@@ -404,7 +405,7 @@ void APIServer::send_homeassistant_action(const HomeassistantActionRequest &call
|
|||||||
}
|
}
|
||||||
|
|
||||||
void APIServer::register_action_response_callback(uint32_t call_id, ActionResponseCallback callback) {
|
void APIServer::register_action_response_callback(uint32_t call_id, ActionResponseCallback callback) {
|
||||||
this->action_response_callbacks_[call_id] = callback;
|
this->action_response_callbacks_[call_id] = std::move(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void APIServer::handle_action_response(uint32_t call_id, bool success, const std::string &error_message,
|
void APIServer::handle_action_response(uint32_t call_id, bool success, const std::string &error_message,
|
||||||
|
Reference in New Issue
Block a user