From 530df910442a11192f7bcea92719bddaefb3be91 Mon Sep 17 00:00:00 2001 From: Garret Buell Date: Tue, 10 Jan 2023 15:27:30 -0800 Subject: [PATCH] Fix HttpRequestResponseTrigger (#4270) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> fixes https://github.com/esphome/issues/issues/4010 --- esphome/components/http_request/http_request.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/esphome/components/http_request/http_request.h b/esphome/components/http_request/http_request.h index 3b15a6c89a..48163a70aa 100644 --- a/esphome/components/http_request/http_request.h +++ b/esphome/components/http_request/http_request.h @@ -31,7 +31,10 @@ struct Header { const char *value; }; -class HttpRequestResponseTrigger; +class HttpRequestResponseTrigger : public Trigger { + public: + void process(int status_code, uint32_t duration_ms) { this->trigger(status_code, duration_ms); } +}; class HttpRequestComponent : public Component { public: @@ -138,11 +141,6 @@ template class HttpRequestSendAction : public Action { std::vector response_triggers_; }; -class HttpRequestResponseTrigger : public Trigger { - public: - void process(int status_code, uint32_t duration_ms) { this->trigger(status_code, duration_ms); } -}; - } // namespace http_request } // namespace esphome