谷歌智能家居操作在命令执行时总是失败

问题描述

我正在为 Google Actions 开发 fanSpeed 和 colorSetting 特性,但是每当我执行设置风扇速度或设置灯光颜色的命令时,它都会失败。这是我用于同步、查询和执行步骤的 JSON:

同步

{
"requestId":"d25ty67q-98jui-581aa-j891-b1f6dhuas"
"payload":{
  "devices": [
    {
      "id": "AA96A0#16","type": "action.devices.types.FAN","traits": [
        "action.devices.traits.OnOff","action.devices.traits.FanSpeed"
      ],"roomHint": "ROOM","deviceInfo": {
        "manufacturer": "smart Homes"
      },"name": {
        "defaultNames": [
          "fan"
        ],"name": "fan"
      },"willReportState": true,"customData": {
        
      },"attributes": {
        "commandOnlyOnOff": false,"commandOnlyFanSpeed": false,"reversible": false,"availableFanSpeeds": {
          "speeds": [
              {"speed_name": "speed_low","speed_values": [{"speed_synonym": ["low","low speed","slow"],"lang": "en"}]},{"speed_name": "speed_medium","speed_values": [{"speed_synonym": ["medium","medium speed","med"],{"speed_name": "speed_high","speed_values": [{"speed_synonym": [ "high speed","high"],{"speed_name": "speed_highest","speed_values": [{"speed_synonym": [ "highest speed","highest"],"lang": "en"}]}
          ],"ordered": true
        }
      }
    },{
      "id": "240A50#0","type": "action.devices.types.LIGHT","action.devices.traits.ColorSetting"
      ],"name": {
        "defaultNames": [
          "light"
        ],"name": "light"
      },"willReportState": false,"customData": {
       
      },"attributes": {
        "commandOnlyColorSetting": true,"colorModel": "hsv"
      }
    }
  ],"agentUserId": "Home555"
}
}

执行风扇

{
  "commands": [
    {
      "ids": [
        "AA96A0#16"
      ],"status": "SUCCESS","states": {
        "online": true,"on": true,"currentFanSpeedSetting": "speed_highest"
      }
    }
  ]
}

查询粉丝

{
"requestId":"167278043664013971","payload":{
  "devices": {
    "AA96A0#16": {
      "status": "SUCCESS","online": true,"currentFanSpeedSetting": "speed_highest"
    }
  }
}
}

执行彩色

{
  "commands": [
    {
      "ids": [
        "240A50#0"
      ],"color": {
          "spectrumHSV": {
            "hue": 120,"saturation": 1,"value": 1
          }
        }
      }
    }
  ]
}

查询色光

{
"requestId":"167278043664013971","payload":{
  "devices": {
    "240A50#0": {
      "status": "SUCCESS","color": {
        "spectrumHSV": {
          "hue": 0,"saturation": 0,"value": 1
        }
      }
    }
  }
}
}

发言人回复:抱歉,目前似乎无法使用智能家居。

但是我的请求总是在执行,我可以在我的设备上看到状态变化。谁能指出为什么它失败了?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)