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:
Paulus Schoutsen 2018-03-01 07:35:12 -08:00 committed by GitHub
parent 7d8ca2010b
commit 491b3d707c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 111 additions and 31 deletions

View file

@ -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