Fix HttpRequestResponseTrigger (#4270)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/4010
This commit is contained in:
Garret Buell 2023-01-10 15:27:30 -08:00 committed by GitHub
parent c16c0b11cb
commit 530df91044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,10 @@ struct Header {
const char *value;
};
class HttpRequestResponseTrigger;
class HttpRequestResponseTrigger : public Trigger<int, uint32_t> {
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<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
std::vector<HttpRequestResponseTrigger *> response_triggers_;
};
class HttpRequestResponseTrigger : public Trigger<int, uint32_t> {
public:
void process(int status_code, uint32_t duration_ms) { this->trigger(status_code, duration_ms); }
};
} // namespace http_request
} // namespace esphome