mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Fix Nextion HTTPClient error for ESP32 (#2524)
This commit is contained in:
		| @@ -8,7 +8,7 @@ from esphome.const import ( | |||||||
|     CONF_BRIGHTNESS, |     CONF_BRIGHTNESS, | ||||||
|     CONF_TRIGGER_ID, |     CONF_TRIGGER_ID, | ||||||
| ) | ) | ||||||
|  | from esphome.core import CORE | ||||||
| from . import Nextion, nextion_ns, nextion_ref | from . import Nextion, nextion_ns, nextion_ref | ||||||
| from .base_component import ( | from .base_component import ( | ||||||
|     CONF_ON_SLEEP, |     CONF_ON_SLEEP, | ||||||
| @@ -76,6 +76,9 @@ async def to_code(config): | |||||||
|     if CONF_TFT_URL in config: |     if CONF_TFT_URL in config: | ||||||
|         cg.add_define("USE_NEXTION_TFT_UPLOAD") |         cg.add_define("USE_NEXTION_TFT_UPLOAD") | ||||||
|         cg.add(var.set_tft_url(config[CONF_TFT_URL])) |         cg.add(var.set_tft_url(config[CONF_TFT_URL])) | ||||||
|  |         if CORE.is_esp32: | ||||||
|  |             cg.add_library("WiFiClientSecure", None) | ||||||
|  |             cg.add_library("HTTPClient", None) | ||||||
|  |  | ||||||
|     if CONF_TOUCH_SLEEP_TIMEOUT in config: |     if CONF_TOUCH_SLEEP_TIMEOUT in config: | ||||||
|         cg.add(var.set_touch_sleep_timeout_internal(config[CONF_TOUCH_SLEEP_TIMEOUT])) |         cg.add(var.set_touch_sleep_timeout_internal(config[CONF_TOUCH_SLEEP_TIMEOUT])) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user