diff --git a/esphome/components/modbus/__init__.py b/esphome/components/modbus/__init__.py index 8b2e75d58c..0846f6e869 100644 --- a/esphome/components/modbus/__init__.py +++ b/esphome/components/modbus/__init__.py @@ -51,14 +51,14 @@ CONFIG_SCHEMA = ( .extend(uart.UART_DEVICE_SCHEMA) ) + def validate_rx_full_threshold_uart(config): - uart.final_validate_device_schema( - "modbus", rx_full_threshold=1 - )(config) + uart.final_validate_device_schema("modbus", rx_full_threshold=1)(config) FINAL_VALIDATE_SCHEMA = validate_rx_full_threshold_uart + async def to_code(config): cg.add_global(modbus_ns.using) var = cg.new_Pvariable(config[CONF_ID])