I've been playing with Alexa skills and looking to do some basic home automation. I have defined the following basic intent schema to start:
{
"intents": [
{
"intent": "Lock",
"slots": [
{
"name" : "Door",
"type" : "AMAZON.LITERAL"
}
]
},
{
"intent": "Unlock",
"slots": [
{
"name" : "Door",
"type" : "AMAZON.LITERAL"
}
]
}
]
}
And then the sample utterances:
Lock lock {slot value|Door}
Lock lock door {slot value|Door}
Lock lock the door {slot value|Door}
Unlock unlock {slot value|Door}
Unlock unlock door {slot value|Door}
Unlock unlock the door {slot value|Door}
The idea being that the door names would have to be freeform, since they won't be known ahead of time. However, when i try out a phrase like:
lock door front
It finds the right intent, but the "Door" slot value contains extra words:
"intent": {
"name": "Lock",
"slots": {
"Door": {
"name": "Door",
"value": "door front"
}
}
}
Is this normal, or is it a byproduct of using an AMAZON.LITERAL? I've also tried a custom slot type, but multiple word device names don't seem to work well with it, and it always uses the last word in that case.