1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 22:53:59 +00: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

@@ -62,6 +62,7 @@ CONFIG_SCHEMA = (
.extend(cv.polling_component_schema("20s"))
.extend(uart.UART_DEVICE_SCHEMA)
)
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema("gps", require_rx=True)
async def to_code(config):
@@ -95,7 +96,3 @@ async def to_code(config):
# https://platformio.org/lib/show/1655/TinyGPSPlus
cg.add_library("1655", "1.0.2") # TinyGPSPlus, has name conflict
def validate(config, item_config):
uart.validate_device("gps", config, item_config, require_tx=False)