From ae476bb400f14d51c0e569a3807264a7abcd01e1 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:51:32 +1200 Subject: [PATCH] [http_request] Change default timeout to 4.5s (#7123) --- esphome/components/http_request/__init__.py | 2 +- esphome/components/http_request/http_request.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/http_request/__init__.py b/esphome/components/http_request/__init__.py index ade7024bed..ef387553fe 100644 --- a/esphome/components/http_request/__init__.py +++ b/esphome/components/http_request/__init__.py @@ -99,7 +99,7 @@ CONFIG_SCHEMA = cv.All( cv.Optional(CONF_FOLLOW_REDIRECTS, True): cv.boolean, cv.Optional(CONF_REDIRECT_LIMIT, 3): cv.int_, cv.Optional( - CONF_TIMEOUT, default="5s" + CONF_TIMEOUT, default="4.5s" ): cv.positive_time_period_milliseconds, cv.SplitDefault(CONF_ESP8266_DISABLE_SSL_SUPPORT, esp8266=False): cv.All( cv.only_on_esp8266, cv.boolean diff --git a/esphome/components/http_request/http_request.h b/esphome/components/http_request/http_request.h index 82b7392648..c01baf8644 100644 --- a/esphome/components/http_request/http_request.h +++ b/esphome/components/http_request/http_request.h @@ -80,7 +80,7 @@ class HttpRequestComponent : public Component { const char *useragent_{nullptr}; bool follow_redirects_; uint16_t redirect_limit_; - uint16_t timeout_{5000}; + uint16_t timeout_{4500}; uint32_t watchdog_timeout_{0}; };