Используйте диалоговые окна alexa, и когда dialogState! = 'COMPLETED' проверяет значение слота {deviceName}, и, если его нет в списке, снова вызывайте слот с правильным ответом.Сделайте что-то вроде этого:
if (dialogState === 'STARTED') {
return handlerInput.responseBuilder
.addDelegateDirective()
.getResponse();
}
else if (dialogState !== 'COMPLETED') {
if (intent.slots.deviceName.value) {
if ( //check if the deviceName is not in the list ) {
return handlerInput.responseBuilder
.speak('Sorry, this device is not added in your list, say again...')
.addElicitSlotDirective(intent.slots.deviceName.name)
.getResponse();
}
else {
return handlerInput.responseBuilder
.addDelegateDirective()
.getResponse()
}
}
else {
//dialogState is 'COMPLETED'
//here you have the correct device name
}