Google Assistant SDK: Log command and response (#84904)

Log command and response
This commit is contained in:
tronikos
2022-12-31 12:07:31 -08:00
committed by GitHub
parent 82977a43d3
commit d90ec3ccca
5 changed files with 15 additions and 7 deletions

View File

@@ -41,7 +41,8 @@ async def test_broadcast_one_target(
target = "basement"
expected_command = "broadcast to basement time for dinner"
with patch(
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist"
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
return_value=["text_response", None],
) as mock_assist_call:
await hass.services.async_call(
notify.DOMAIN,
@@ -64,7 +65,8 @@ async def test_broadcast_two_targets(
expected_command1 = "broadcast to basement time for dinner"
expected_command2 = "broadcast to master bedroom time for dinner"
with patch(
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist"
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
return_value=["text_response", None],
) as mock_assist_call:
await hass.services.async_call(
notify.DOMAIN,
@@ -84,7 +86,8 @@ async def test_broadcast_empty_message(
await setup_integration()
with patch(
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist"
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
return_value=["text_response", None],
) as mock_assist_call:
await hass.services.async_call(
notify.DOMAIN,