[micro_wake_word] Allow simpler model config (#7094)

This commit is contained in:
Jesse Hills 2024-07-16 16:29:45 +12:00 committed by GitHub
parent f1d19416be
commit c910fdf7e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,7 +357,9 @@ CONFIG_SCHEMA = cv.All(
{
cv.GenerateID(): cv.declare_id(MicroWakeWord),
cv.GenerateID(CONF_MICROPHONE): cv.use_id(microphone.Microphone),
cv.Required(CONF_MODELS): cv.ensure_list(MODEL_SCHEMA),
cv.Required(CONF_MODELS): cv.ensure_list(
cv.maybe_simple_value(MODEL_SCHEMA, key=CONF_MODEL)
),
cv.Optional(CONF_ON_WAKE_WORD_DETECTED): automation.validate_automation(
single=True
),