[ethernet] fix used pins validation in configuration of RMII pins (#12486)
This commit is contained in:
committed by
Jonathan Swoboda
parent
734710d22a
commit
fffa16e4d8
@@ -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)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<<: !include common-lan8720.yaml
|
||||
|
||||
sn74hc165:
|
||||
- id: sn74hc165_hub
|
||||
clock_pin: GPIO13
|
||||
data_pin: GPIO14
|
||||
load_pin: GPIO15
|
||||
sr_count: 3
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
sn74hc165: sn74hc165_hub
|
||||
number: 19
|
||||
id: relay_2
|
||||
Reference in New Issue
Block a user