mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 03:18:28 +02:00
Improve config final validation (#1917)
This commit is contained in:
@@ -40,6 +40,9 @@ CONFIG_SCHEMA = cv.All(
|
||||
.extend(cv.polling_component_schema("5s"))
|
||||
.extend(uart.UART_DEVICE_SCHEMA)
|
||||
)
|
||||
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
|
||||
"sim800l", baud_rate=9600, require_tx=True, require_rx=True
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
@@ -54,10 +57,6 @@ async def to_code(config):
|
||||
)
|
||||
|
||||
|
||||
def validate(config, item_config):
|
||||
uart.validate_device("sim800l", config, item_config, baud_rate=9600)
|
||||
|
||||
|
||||
SIM800L_SEND_SMS_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.use_id(Sim800LComponent),
|
||||
|
||||
Reference in New Issue
Block a user