Google Assistant Smarthome:查询风扇速度总是失败



为Google行动开发粉丝特征,查询粉丝状态总是返回失败。这是我的步骤:

同步

{ "id": "d25dde36-76cb-44aa-a649-b1f61bb3bebb", "type": "action.devices.types.FAN", "traits": ["action.devices.traits.OnOff", "action.devices.traits.FanSpeed"], "name": { "name": "living room fan" }, "willReportState": false, "attributes": { "availableFanSpeeds": { "ordered": true, "speeds": [{ "speed_name": "low", "speed_values": [{ "lang": "en", "speed_synonym": ["low"] }] }, { "speed_name": "medium", "speed_values": [{ "lang": "en", "speed_synonym": ["medium"] }] }, { "speed_name": "high", "speed_values": [{ "lang": "en", "speed_synonym": ["high"] }] }] } }, "deviceInfo": { "manufacturer": "XYZ" }, "customData": { "serialID": "001D10010334", "type": "resource" } }

查询

{"inputs":[{"intent":"action.devices.QUERY","payload":{"devices":[{"customData":{"serialID":"001D10010334","type":"resource"},"id":"d25dde36-76cb-44aa-a649-b1f61bb3bebb"}]}}],"requestId":"16727804366400067692"}

技能响应

{"requestId":"16727804366400067692","payload":{"devices":{"d25dde36-76cb-44aa-a649-b1f61bb3bebb":{"online":true,"currentFanSpeedSetting":"medium","on":true}}}}

谷歌家用扬声器

抱歉,我现在无法联系到客厅风扇。请重试。

尽管返回的消息与文档 https://developers.google.com/actions/smarthome/traits/fanspeed#device-states 兼容,但为什么说话人没有返回"正确"的消息。

以为风扇OnOff的查询是可以的。

有什么想法吗?

谢谢。

可逆特征是强制性的。如果属性不完整,则特征不处于活动状态。

如果"可逆"特性设置为 true,则此设备支持向两个方向吹风扇,并且可以接受反转风扇方向的命令。

最新更新