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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user