스마트 홈 작업을 개발하는 방법을 알아볼 수 있는 새로운 공간인 Google Home 개발자 센터에 오신 것을 환영합니다. 참고: Actions 콘솔에서 작업을 계속 만들 수 있습니다.

연결 해제

사용자가 Google Assistant에서 smart home 작업의 연결을 해제하면 처리에 action.devices.DISCONNECT 인텐트가 수신됩니다. 이 인텐트는 Assistant가 이 사용자의 인텐트를 더 이상 전송하지 않으며 클라우드 서비스가 사용자 기기의 Google Home Graph API (요청 동기화 및 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 인텐트 참조 문서를 확인하세요.