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
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue