1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

Improve config final validation (#1917)

This commit is contained in:
Otto Winter
2021-06-17 21:54:14 +02:00
committed by GitHub
parent c19b3ecd43
commit 2419bc3678
18 changed files with 303 additions and 162 deletions

View File

@@ -68,6 +68,9 @@ CONFIG_SCHEMA = cv.All(
}
).extend(uart.UART_DEVICE_SCHEMA)
)
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
"dfplayer", baud_rate=9600, require_tx=True
)
async def to_code(config):
@@ -80,12 +83,6 @@ async def to_code(config):
await automation.build_automation(trigger, [], conf)
def validate(config, item_config):
uart.validate_device(
"dfplayer", config, item_config, baud_rate=9600, require_rx=False
)
@automation.register_action(
"dfplayer.play_next",
NextAction,