mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
add validate modem input config
This commit is contained in:
parent
6da178091b
commit
5380e921d1
1 changed files with 24 additions and 21 deletions
|
@ -45,7 +45,8 @@ def _validate(config):
|
|||
return config
|
||||
|
||||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(ModemComponent),
|
||||
cv.Required(CONF_TYPE): cv.enum(MODEM_TYPES, upper=True),
|
||||
|
@ -65,7 +66,9 @@ CONFIG_SCHEMA = cv.Schema(
|
|||
cv.Optional(CONF_DOMAIN, default=".local"): cv.domain_name,
|
||||
cv.Optional(CONF_USE_ADDRESS): cv.string_strict,
|
||||
}
|
||||
).extend(cv.COMPONENT_SCHEMA)
|
||||
).extend(cv.COMPONENT_SCHEMA),
|
||||
_validate,
|
||||
)
|
||||
|
||||
|
||||
@coroutine_with_priority(60.0)
|
||||
|
|
Loading…
Reference in a new issue