mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
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:
parent
c16c0b11cb
commit
530df91044
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user