diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3baaf02506..c32dc11b61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,10 @@ jobs: file: tests/test6.yaml name: Test tests/test6.yaml pio_cache_key: test6 + - id: test + file: tests/test7.yaml + name: Test tests/test7.yaml + pio_cache_key: test7 - id: pytest name: Run pytest - id: clang-format diff --git a/esphome/components/http_request/http_request.h b/esphome/components/http_request/http_request.h index 48163a70aa..0958c07683 100644 --- a/esphome/components/http_request/http_request.h +++ b/esphome/components/http_request/http_request.h @@ -31,9 +31,9 @@ struct Header { const char *value; }; -class HttpRequestResponseTrigger : public Trigger { +class HttpRequestResponseTrigger : public Trigger { public: - void process(int status_code, uint32_t duration_ms) { this->trigger(status_code, duration_ms); } + void process(int32_t status_code, uint32_t duration_ms) { this->trigger(status_code, duration_ms); } }; class HttpRequestComponent : public Component { diff --git a/tests/README.md b/tests/README.md index ed78b3e7d1..3238acaa79 100644 --- a/tests/README.md +++ b/tests/README.md @@ -25,3 +25,4 @@ Current test_.yaml file contents. | test4.yaml | ESP32 | ethernet | None | test5.yaml | ESP32 | wifi | ble_server | test6.yaml | RP2040 | wifi | N/A +| test7.yaml | ESP32-C3 | wifi | N/A diff --git a/tests/test7.yaml b/tests/test7.yaml new file mode 100644 index 0000000000..10e1b035ab --- /dev/null +++ b/tests/test7.yaml @@ -0,0 +1,33 @@ +# Tests for ESP32-C3 boards which use toolchain-riscv32-esp +--- +wifi: + ssid: 'ssid' + +esp32: + board: lolin_c3_mini + framework: + type: arduino + +esphome: + name: 'on-response-test' + on_boot: + then: + - http_request.send: + method: PUT + url: https://esphome.io + headers: + Content-Type: application/json + body: Some data + verify_ssl: false + on_response: + then: + - logger.log: + format: "Response status: %d" + args: + - status_code + +logger: + +http_request: + useragent: esphome/tagreader + timeout: 10s