简体   繁体   English

谷歌智能家居操作中的 action.devices.commands.OpenClose 特性无法正常工作

[英]action.devices.commands.OpenClose trait in Google Smart Home actions does not work properly

When I give command "Open the device 30 percent", the data received by intent fulfillment is当我发出命令“将设备打开 30%”时,意图实现收到的数据是

{
   "command": "action.devices.commands.OpenClose",
   "params": {
     "followUpToken": "00f38e7b45edbc12fafce49c23568896b7feea58a8a4ba873f31abad7db96de28a25389a2987c7f8deff41afcb25fdffb2b81fe2",
     "openPercent": 100
   }
}

As shown above, the "openPercent" is not correctly interpreted.如上所示,未正确解释“openPercent”。 But if I give command "Close the device 70 percent", the data received by intent fulfillment is但是如果我发出命令“关闭设备 70%”,意图实现接收到的数据是

{
   "command": "action.devices.commands.OpenClose",
   "params": {
     "followUpToken": "00f38e7b4588ad650859efe30a46d7dcb565e3a7eea257919678d5cda32fd769f290298ec8c9d40d0eb3a1b52b0063921823a39d",
     "openPercent": 30
   }
}

So we can see that the "openPercent" is correctly interpreted for this command.所以我们可以看到“openPercent”被正确解释为这个命令。

Just wondering what caused the action.devices.commands.OpenClose trait only works partially.只是想知道是什么导致了 action.devices.commands.OpenClose 特性只部分起作用。

  • There are two main possibilities of what might be going wrong with the device trait on this one: Your execution might not be interpreted correctly by the Google systems, or your device definition might be in a way such that Google sends you a discrete fully open intent.设备特征可能出现问题的主要可能性有两种:谷歌系统可能无法正确解释你的执行,或者你的设备定义可能以某种方式让谷歌向你发送一个离散的完全开放的意图.
  • To check if the issue is with the interpretation, you can try typing out the command as well as speaking it via voice, to see if Google sends you different values with the execution intent.要检查问题是否与解释有关,您可以尝试输入命令以及通过语音说出它,以查看 Google 是否向您发送了不同的执行意图值。 Please also try our different grammar, such as “Open the device 30 percent”, “Open the device”, “Set the device to 50 open”, “Partially open the device 60 percent” to see if any of these would help.也请尝试我们的不同语法,例如“打开设备 30%”、“打开设备”、“将设备设置为 50 打开”、“部分打开设备 60%”,看看这些是否有帮助。 It might be possible that your intent to open might be always recognized as “100%”.您的打开意图可能始终被识别为“100%”。
  • The second possibility is that your device definition might lead Google to send you discrete states of fully open & fully close (or one of these, as in your case).第二种可能性是您的设备定义可能会导致 Google 向您发送完全打开和完全关闭的离散状态(或其中一种,如您的情况)。 To troubleshoot, please check your Sync response for any potential issues on how you define the trait attributes.要进行故障排除,请检查您的 Sync 响应是否存在关于您如何定义特征属性的任何潜在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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