The simulator for dialogflow is displaying all the content of a Basic Card object as expected per google assistant simulator; however the google nest hub is displaying everything but the button that provides the link that I want users to see. My response works just fine, its just this button not displaying that's holding me back from the desired result.
I've tried searching for why the nest hub specifically might not display card buttons, but it may be not a thoroughly explored area.
const functions = require('firebase-functions');
const {dialogflow,BasicCard, Button,Image} = require('actions-on-google');
const WELCOME_INTENT = 'Default Welcome Intent';
const FALLBACK_INTENT = 'Default Fallback Intent';
const CKD_MEALS_INTENT = 'ckdMealsIntent';
const CKD_MEALS_TYPE_ENTITY = 'ckdMeals';
const app = dialogflow();
app.intent(WELCOME_INTENT, (conv) => {
conv.ask("Welcome to the quote generator! Ask for a quote about happinness, friendship, or inspiration");
});
app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("I didn't understand your request");
});
app.intent(CKD_MEALS_INTENT, (conv) => {
const meal_type = conv.parameters[CKD_MEALS_TYPE_ENTITY].toLowerCase();
if (meal_type == "vegetarian") {
conv.ask("Here's a suggestion for a vegetarian meal:"); // this Simple Response is necessary
conv.ask(new BasicCard({
image: new Image({
url: 'https://user-images.githubusercontent.com/41710701/62001145-0ddf1580-b0af-11e9-84cf-607f6ef980c7.png', //url of your image.
alt: 'Image alternate text',
}),
}));
}
else if (meal_type == "budget"){
conv.ask("Here's a suggestion for a budget meal:");
conv.ask(new BasicCard({
subtitle: 'This is a subtitle',
title: 'Beef Burritos',
buttons: new Button({
title: 'This is a button',
url: 'https://www.davita.com/diet-nutrition/recipes/beef-lamb-pork/beef-burritos',
}),
image: new Image({
url: 'https://user-images.githubusercontent.com/41710701/62010589-715e5700-b132-11e9-96e5-730b30d55d7e.jpg',
alt: 'Image alternate text',
}),
}));
}
else if (meal_type == "easy"){
conv.ask("Here's a suggestion for a easy-to-make meal:");
}
else{
conv.ask("Life can only be understood backwards, but it must be lived forwards.");
}
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
I expected to see the button not only on the actions call simulator(link attached to the button works and everything on sim), but on the google nest hub as well. The nest hub displays everything but the button, simple as that. No error messages whatsoever in simulator.