mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[ethernet] Remove redundant Arduino framework version check
This commit is contained in:
		| @@ -117,9 +117,9 @@ ManualIP = ethernet_ns.struct("ManualIP") | |||||||
|  |  | ||||||
| def _is_framework_spi_polling_mode_supported(): | def _is_framework_spi_polling_mode_supported(): | ||||||
|     # SPI Ethernet without IRQ feature is added in |     # SPI Ethernet without IRQ feature is added in | ||||||
|     # esp-idf >= (5.3+ ,5.2.1+, 5.1.4) and arduino-esp32 >= 3.0.0 |     # esp-idf >= (5.3+ ,5.2.1+, 5.1.4) | ||||||
|  |     # Note: Arduino now uses ESP-IDF as a component, so we only check IDF version | ||||||
|     framework_version = CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] |     framework_version = CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] | ||||||
|     if CORE.using_esp_idf: |  | ||||||
|     if framework_version >= cv.Version(5, 3, 0): |     if framework_version >= cv.Version(5, 3, 0): | ||||||
|         return True |         return True | ||||||
|     if cv.Version(5, 3, 0) > framework_version >= cv.Version(5, 2, 1): |     if cv.Version(5, 3, 0) > framework_version >= cv.Version(5, 2, 1): | ||||||
| @@ -127,10 +127,6 @@ def _is_framework_spi_polling_mode_supported(): | |||||||
|     if cv.Version(5, 2, 0) > framework_version >= cv.Version(5, 1, 4):  # noqa: SIM103 |     if cv.Version(5, 2, 0) > framework_version >= cv.Version(5, 1, 4):  # noqa: SIM103 | ||||||
|         return True |         return True | ||||||
|     return False |     return False | ||||||
|     if CORE.using_arduino: |  | ||||||
|         return framework_version >= cv.Version(3, 0, 0) |  | ||||||
|     # fail safe: Unknown framework |  | ||||||
|     return False |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def _validate(config): | def _validate(config): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user