Add optional words to conversation utterances (#12772)
* Add optional words to conversation utterances * Conversation to handle singular/plural * Remove print * Add pronounce detection to shopping list * Lint * fix tests * Add optional 2 words * Fix tests * Conversation: coroutine -> async/await * Replace \s with space
This commit is contained in:
parent
7d8ca2010b
commit
491b3d707c
6 changed files with 111 additions and 31 deletions
|
@ -100,7 +100,8 @@ def async_match_state(hass, name, states=None):
|
|||
state = _fuzzymatch(name, states, lambda state: state.name)
|
||||
|
||||
if state is None:
|
||||
raise IntentHandleError('Unable to find entity {}'.format(name))
|
||||
raise IntentHandleError(
|
||||
'Unable to find an entity called {}'.format(name))
|
||||
|
||||
return state
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue