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

@ -212,7 +212,7 @@ def test_turn_on_intent(hass):
)
yield from hass.async_block_till_done()
assert response.speech['plain']['speech'] == 'Turned on test light'
assert response.speech['plain']['speech'] == 'Turned test light on'
assert len(calls) == 1
call = calls[0]
assert call.domain == 'light'
@ -234,7 +234,7 @@ def test_turn_off_intent(hass):
)
yield from hass.async_block_till_done()
assert response.speech['plain']['speech'] == 'Turned off test light'
assert response.speech['plain']['speech'] == 'Turned test light off'
assert len(calls) == 1
call = calls[0]
assert call.domain == 'light'
@ -283,7 +283,7 @@ def test_turn_on_multiple_intent(hass):
)
yield from hass.async_block_till_done()
assert response.speech['plain']['speech'] == 'Turned on test lights 2'
assert response.speech['plain']['speech'] == 'Turned test lights 2 on'
assert len(calls) == 1
call = calls[0]
assert call.domain == 'light'