डिसकनेक्ट करें

अगर उपयोगकर्ता आपकी smart home कार्रवाई को Google Assistant से अनलिंक करता है, तो फ़ुलफ़िलमेंट के लिए एक action.devices.DISCONNECT इंटेंट मिलता है. इससे पता चलता है कि Assistant अब इस उपयोगकर्ता को कोई इंटेंट नहीं भेजेगा. साथ ही, आपकी क्लाउड सेवा को अपने डिवाइसों के लिए, Google Home Graph एपीआई (सिंक का अनुरोध करें और 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 इंटेंट से जुड़ा दस्तावेज़ देखें.