[英]Google Smart Home: "is <light> <state>? doesn't do a QUERY
Everytime I do a: “Is {light} ON?”, Google Home doesn't do a QUERY against our integration.每次我执行“{light} 是否开启?”时,Google Home 都不会针对我们的集成进行 QUERY。 It always use the cached result from ReportState.它总是使用来自 ReportState 的缓存结果。
Even with ReportState sending “online”: false, the response is "The {light} is " instead of {light} isn't available right now".即使 ReportState 发送“online”:false,响应是“{light} 是“而不是 {light} 现在不可用”。
Here is an example of our Report State:这是我们的报告状态的示例:
{
"requestId":"fecfa392-5bdc-4054-bc70-e4499bc4a733”,
"agent_user_id":"2”,
"payload":{
"devices":{
"states":{
"60dcd8a06472":{
"online":false,
"color":{
"spectrumRGB":16711680
},
"on":false,
"brightness":0
}
}
}
}
}
Google Home Graph API respond with success and if we play with this and ask: “Is {light} ON?”, the response from Google match the latest ReportState but the online: false is always ignored. Google Home Graph API 响应成功,如果我们使用它并询问:“{light} ON 吗?”,来自 Google 的响应与最新的 ReportState 匹配,但 online: false 始终被忽略。
Currently Google Home depends on a variety of factors in order to provide state responses to users including Query, Report State and a combination of these.目前,Google Home 依赖多种因素向用户提供状态响应,包括查询、报告状态以及这些因素的组合。 In order to ensure a good experience, you need to implement both correctly.为了确保良好的体验,您需要正确实施两者。
The offline:false
case takes precedence now, given it was done as your most recent reported state and does not include any other values (When you do report a device is offline, do not report other trait values or attributes).现在, offline:false
情况优先,因为它是作为您最近报告的状态完成的,并且不包含任何其他值(当您报告设备离线时,不要报告其他特征值或属性)。 If you still get a different behavior, you can report it on the Public Issue Tracker .如果您仍然遇到不同的行为,您可以在Public Issue Tracker上报告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.