From 31a787eae13dd1a56a83bc768856839652f013ee Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 14 Mar 2026 14:41:33 -1000 Subject: [PATCH] [ethernet] Restore SPI polling version comment and add return type Add back the useful comment about which ESP-IDF versions support SPI Ethernet without IRQ. Add return type annotation. --- esphome/components/ethernet/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/esphome/components/ethernet/__init__.py b/esphome/components/ethernet/__init__.py index 813e14f2eb..83bef4d91c 100644 --- a/esphome/components/ethernet/__init__.py +++ b/esphome/components/ethernet/__init__.py @@ -160,8 +160,12 @@ EthernetComponent = ethernet_ns.class_("EthernetComponent", cg.Component) ManualIP = ethernet_ns.struct("ManualIP") -def _is_framework_spi_polling_mode_supported(): - """Check if ESP-IDF framework supports SPI polling mode (ESP32 only).""" +def _is_framework_spi_polling_mode_supported() -> bool: + """Check if ESP-IDF framework supports SPI polling mode (ESP32 only). + + SPI Ethernet without IRQ feature is added in + esp-idf >= (5.3+, 5.2.1+, 5.1.4) + """ if not CORE.is_esp32: return False from esphome.components.esp32 import idf_version