[ethernet] fix used pins validation in configuration of RMII pins (#12486)

This commit is contained in:
mbohdal
2025-12-14 18:17:00 -05:00
committed by Jonathan Swoboda
parent 734710d22a
commit fffa16e4d8
2 changed files with 19 additions and 1 deletions
+4 -1
View File
@@ -434,10 +434,13 @@ def _final_validate_rmii_pins(config: ConfigType) -> None:
# Check all used pins against RMII reserved pins
for pin_list in pins.PIN_SCHEMA_REGISTRY.pins_used.values():
for pin_path, _, pin_config in pin_list:
for pin_path, pin_device, pin_config in pin_list:
pin_num = pin_config.get(CONF_NUMBER)
if pin_num not in rmii_pins:
continue
# Skip if pin is not directly on ESP, but at some expander (device set to something else than 'None')
if pin_device is not None:
continue
# Found a conflict - show helpful error message
pin_function = rmii_pins[pin_num]
component_path = ".".join(str(p) for p in pin_path)