mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 02:14:19 -07:00
e81eff22c393943422e9c965344c5e120e9beefb
Fix UART0 communication failure on ESP-IDF 5.4.2+ that affected LD2410 and other UART sensors on default UART0 pins across all ESP32 variants. The gpio_reset_pin() workaround from PR #12519 sets GPIO_MODE_DISABLE which disables the input buffer. Without a subsequent pin->setup() call, uart_set_pin() on IOMUX-connected UART0 default pins does not re-enable the input buffer, so the RX pin cannot receive data. PR #11914 made pin->setup() conditional on pull/open-drain flags, which meant most users' UART0 RX pins never got their input buffer re-enabled. The fix: always call pin->setup() for pins matching U0TXD_GPIO_NUM or U0RXD_GPIO_NUM to restore proper GPIO direction after gpio_reset_pin(). For non-UART0 pins, the conditional behavior is preserved to avoid breaking external components (issue #11823). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
524 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
