Add Intent component (#8434)
* Add intent component * Add intent script component * Add shopping list component * Convert Snips to use intent component * Convert Alexa to use intent component * Lint * Fix Alexa tests * Update snips test * Add intent support to conversation * Add API to view shopping list contents * Lint * Fix demo test * Lint * lint * Remove type from slot schema * Add dependency to conversation * Move intent to be a helper * Fix conversation * Clean up intent helper * Fix Alexa * Snips to use new hass.components * Allow registering intents with conversation at any point in time * Shopping list to register sentences * Add HTTP endpoint to Conversation * Add async action option to intent_script * Update API.ai to use intents * Cleanup Alexa * Shopping list component to register built-in panel * Rename shopping list intent to inlude Hass name
This commit is contained in:
1 parent
7bea69ce83
commit
7edf14e55f
16 files changed
+970
-396
No files matched your search
@@ -47,10 +47,14 @@ def alexa_client(loop, hass, test_client):
|
||||
"uid": "uuid"
|
||||
}
|
||||
},
|
||||
"intents": {
|
||||
}
|
||||
}))
|
||||
assert loop.run_until_complete(async_setup_component(
|
||||
hass, 'intent_script', {
|
||||
'intent_script': {
|
||||
"WhereAreWeIntent": {
|
||||
"speech": {
|
||||
"type": "plaintext",
|
||||
"type": "plain",
|
||||
"text":
|
||||
"""
|
||||
{%- if is_state("device_tracker.paulus", "home")
|
||||
@@ -69,19 +73,19 @@ def alexa_client(loop, hass, test_client):
|
||||
},
|
||||
"GetZodiacHoroscopeIntent": {
|
||||
"speech": {
|
||||
"type": "plaintext",
|
||||
"type": "plain",
|
||||
"text": "You told us your sign is {{ ZodiacSign }}.",
|
||||
}
|
||||
},
|
||||
"AMAZON.PlaybackAction<object@MusicCreativeWork>": {
|
||||
"speech": {
|
||||
"type": "plaintext",
|
||||
"type": "plain",
|
||||
"text": "Playing {{ object_byArtist_name }}.",
|
||||
}
|
||||
},
|
||||
"CallServiceIntent": {
|
||||
"speech": {
|
||||
"type": "plaintext",
|
||||
"type": "plain",
|
||||
"text": "Service called",
|
||||
},
|
||||
"action": {
|
||||
@@ -93,8 +97,7 @@ def alexa_client(loop, hass, test_client):
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
}))
|
||||
return loop.run_until_complete(test_client(hass.http.app))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user