ניתוק

אם המשתמש יבטל את הקישור של ה-smart home Action שלכם אל Google Assistant, ה-fulfillment יקבל כוונת 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מאמרי העזרה בנושא כוונות.