1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 22:28:14 +00:00

[uart] fix lint

This commit is contained in:
brambo123 2025-01-17 17:13:50 +01:00
parent 9b3981ba97
commit d7edc02095

View File

@ -122,19 +122,15 @@ def validate_rx_pin(value):
def validate_flow_control_support(config):
if CORE.is_esp32 and CORE.using_arduino:
if CORE.data[KEY_CORE][
KEY_FRAMEWORK_VERSION
] >= cv.Version(2, 0, 8):
if CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] >= cv.Version(2, 0, 8):
cg.add_define("USE_UART_FLOW_CONTROL")
elif CONF_FLOW_CONTROL_PIN in config:
raise cv.Invalid(
"ESP32 RS485 UART Flow Control requires Arduino framework version 2.0.8 or higher."
)
elif CORE.is_esp32:
return config
else:
elif not CORE.is_esp32:
raise cv.Invalid("Hardware does not support RS485 flow control.")
return config
def validate_invert_esp32(config):
if (