Add area slot to response for cancel all timers (#131638)
Add area slot to responsepull/131650/head
parent
15bf0c728c
commit
192ffc09ee
|
@ -908,7 +908,11 @@ class CancelAllTimersIntentHandler(intent.IntentHandler):
|
|||
canceled += 1
|
||||
|
||||
response = intent_obj.create_response()
|
||||
response.async_set_speech_slots({"canceled": canceled})
|
||||
speech_slots = {"canceled": canceled}
|
||||
if "area" in slots:
|
||||
speech_slots["area"] = slots["area"]["value"]
|
||||
|
||||
response.async_set_speech_slots(speech_slots)
|
||||
|
||||
return response
|
||||
|
||||
|
|
|
@ -1741,6 +1741,7 @@ async def test_cancel_all_timers_area(
|
|||
)
|
||||
assert result.response_type == intent.IntentResponseType.ACTION_DONE
|
||||
assert result.speech_slots.get("canceled", 0) == 1
|
||||
assert result.speech_slots.get("area") == "kitchen"
|
||||
|
||||
# No timers should be running in kitchen
|
||||
result = await intent.async_handle(
|
||||
|
|
Loading…
Reference in New Issue