简体   繁体   中英

Actions on Google Smart Home Skill: Room Hint / Home Graph

The documentation at https://developers.google.com/actions/smarthome/create-app#actiondevicessync mentions that the roomHint field of the JSON response to the sync request can be used to have Google automatically assign devices to correct rooms.

However, no matter what I return in that field, the user still has to manually assign every device to a room and I cannot get Google to automatically recognize the correct room using this roomHint field

Here's an example response:

{
  "requestId": "500166151965294748",
  "payload": {
    "devices": [
      {
        "id": "9",
        "type": "action.devices.types.LIGHT",
        "traits": [
          "action.devices.traits.OnOff"
        ],
        "name": {
          "name": "Light"
        },
        "willReportState": false,
        "roomHint": "Attic"
      }
    ]
  }
}

目前,HomeGraph并不使用提供roomHint的值来确定此设备所在的房间。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM