ניתוק

אם המשתמש מבטל את הקישור של הפעולה smart home לאפשרות Google Assistant, מילוי הבקשה מקבל כוונת רכישה action.devices.DISCONNECT. הכוונה הזו מציינת שלא יישלחו אובייקטים נוספים של Assistant למשתמש הזה, ושירות הענן שלכם צריך להפסיק לקרוא לממשקי API של Google Home Graph (Request Sync ו-Report State) למכשירים שלהם.

בקשה
{
    "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    "inputs": [{
      "intent": "action.devices.DISCONNECT",
    }]
}
JSON
{}
Node.js
const {smarthome} = require('actions-on-google');
const app = smarthome();
// ...
app.onDisconnect((body, headers) => {
  // TODO Disconnect user account from Google Assistant
  // You can return an empty body
  return {};
});
Java
@Override
public void onDisconnect(
    @NotNull DisconnectRequest disconnectRequest, @Nullable Map<?, ?> map) {
  // TODO Disconnect user account from Google Assistant
  // This function does not return anything
}

למידע נוסף, עיינו במסמכי התיעוד של DISCONNECT לכוונת הרכישה.