mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 00:11:59 +01:00
Fix python lint
This commit is contained in:
parent
02089938b4
commit
5a2c000bc4
@ -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])
|
||||
|
@ -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."
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user