[micro_wake_word] Allow simpler model config (#7094)

This commit is contained in:
Jesse Hills 2024-07-16 16:29:45 +12:00
parent 41baf70660
commit 0bbefb5b2a
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -357,7 +357,9 @@ CONFIG_SCHEMA = cv.All(
{ {
cv.GenerateID(): cv.declare_id(MicroWakeWord), cv.GenerateID(): cv.declare_id(MicroWakeWord),
cv.GenerateID(CONF_MICROPHONE): cv.use_id(microphone.Microphone), 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( cv.Optional(CONF_ON_WAKE_WORD_DETECTED): automation.validate_automation(
single=True single=True
), ),