Fix python lint

This commit is contained in:
Bonne Eggleston 2025-01-21 23:20:44 -08:00
parent 02089938b4
commit 5a2c000bc4
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View File

@ -12,7 +12,6 @@ from esphome.const import (
CONF_ADDRESS,
CONF_DISABLE_CRC,
)
from esphome.core import CORE
from esphome import pins
DEPENDENCIES = ["uart"]
@ -52,6 +51,7 @@ CONFIG_SCHEMA = (
.extend(uart.UART_DEVICE_SCHEMA)
)
async def to_code(config):
cg.add_global(modbus_ns.using)
var = cg.new_Pvariable(config[CONF_ID])

View File

@ -248,8 +248,12 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_PARITY, default="NONE"): cv.enum(
UART_PARITY_OPTIONS, upper=True
),
cv.Optional(CONF_RX_FULL_THRESHOLD): cv.All(cv.int_range(min=1, max=120), cv.only_on_esp32),
cv.Optional(CONF_RX_TIMEOUT): cv.All(cv.int_range(min=0, max=126), cv.only_on_esp32),
cv.Optional(CONF_RX_FULL_THRESHOLD): cv.All(
cv.int_range(min=1, max=120), cv.only_on_esp32
),
cv.Optional(CONF_RX_TIMEOUT): cv.All(
cv.int_range(min=0, max=126), cv.only_on_esp32
),
cv.Optional(CONF_INVERT): cv.invalid(
"This option has been removed. Please instead use invert in the tx/rx pin schemas."
),