mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 11:52:20 +01:00
Add validate to components (#1631)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
482a3aebc9
commit
c79d700d03
@@ -137,7 +137,7 @@ WIFI_NETWORK_STA = WIFI_NETWORK_BASE.extend(
|
||||
)
|
||||
|
||||
|
||||
def validate(config):
|
||||
def _validate(config):
|
||||
if CONF_PASSWORD in config and CONF_SSID not in config:
|
||||
raise cv.Invalid("Cannot have WiFi password without SSID!")
|
||||
|
||||
@@ -207,7 +207,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
),
|
||||
}
|
||||
),
|
||||
validate,
|
||||
_validate,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user