关于 google 智能家居 "mode" 特征的详细信息
Detail about google smart home "mode" trait
我有一个关于 device.trait "Modes"
的问题
我创建了一台具有特征模式的洗衣机,SYNC.response 看起来像这样
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "1836.15267389",
"devices": [
{
"id": "311_washer_1",
"type": "action.devices.types.WASHER",
"traits": ["action.devices.traits.Modes","action.devices.traits.OnOff"],
"name": {
"name": "Laboratory Washer 1",
"nicknames": ["Laboratory Washer"]
},
"willReportState": false,
"attributes":{
"availableModes":[{
"name": "speed",
"name_values": [{
"name_synonym": ["speed"],
"lang": "en"
}],
"settings": [{
"setting_name": "fast",
"setting_values": [{
"setting_synonym": ["fast"],
"lang": "en"
}]
},{
"setting_name": "medium",
"setting_values":[{
"setting_synonym":["medium"],
"lang": "en"
}]
},{
"setting_name": "slow",
"setting_values":[{
"setting_synonym":["slow"],
"lang": "en"
}]
}
],
"ordered": true
}]
}
}
]
}
}
我有一个模式调用"speed"
但是当我与助手交谈时,它只是重播我的 "That mode isn't available for it"
谁能告诉我哪里不对或与
有关
Currently, you must use the names in the example JSON; custom names are not yet supported.
谢谢~~
对于合并模式,您只能使用一组特定的可用模式值和设置。目前不支持自定义名称和设置,因此您需要坚持使用特定列表。
如果您想添加新的模式或设置,您可以 file an issue 在 GitHub 示例中,我会添加您想要的特定值。
与此同时,这里有一个示例,应该可以使用当前模式。
"availableModes":[{
"name": "Cleaning Mode",
"name_values": [{
"name_synonym": ["cleaning mode"],
"lang": "en"
}],
"settings": [{
"setting_name": "High",
"setting_values": [{
"setting_synonym": ["high"],
"lang": "en"
}]
},{
"setting_name": "Medium",
"setting_values":[{
"setting_synonym":["medium"],
"lang": "en"
}]
},{
"setting_name": "Low",
"setting_values":[{
"setting_synonym":["low"],
"lang": "en"
}]
}],
"ordered": true
}]
我有一个关于 device.trait "Modes"
的问题我创建了一台具有特征模式的洗衣机,SYNC.response 看起来像这样
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "1836.15267389",
"devices": [
{
"id": "311_washer_1",
"type": "action.devices.types.WASHER",
"traits": ["action.devices.traits.Modes","action.devices.traits.OnOff"],
"name": {
"name": "Laboratory Washer 1",
"nicknames": ["Laboratory Washer"]
},
"willReportState": false,
"attributes":{
"availableModes":[{
"name": "speed",
"name_values": [{
"name_synonym": ["speed"],
"lang": "en"
}],
"settings": [{
"setting_name": "fast",
"setting_values": [{
"setting_synonym": ["fast"],
"lang": "en"
}]
},{
"setting_name": "medium",
"setting_values":[{
"setting_synonym":["medium"],
"lang": "en"
}]
},{
"setting_name": "slow",
"setting_values":[{
"setting_synonym":["slow"],
"lang": "en"
}]
}
],
"ordered": true
}]
}
}
]
}
}
我有一个模式调用"speed"
但是当我与助手交谈时,它只是重播我的 "That mode isn't available for it"
谁能告诉我哪里不对或与
有关Currently, you must use the names in the example JSON; custom names are not yet supported.
谢谢~~
对于合并模式,您只能使用一组特定的可用模式值和设置。目前不支持自定义名称和设置,因此您需要坚持使用特定列表。
如果您想添加新的模式或设置,您可以 file an issue 在 GitHub 示例中,我会添加您想要的特定值。
与此同时,这里有一个示例,应该可以使用当前模式。
"availableModes":[{
"name": "Cleaning Mode",
"name_values": [{
"name_synonym": ["cleaning mode"],
"lang": "en"
}],
"settings": [{
"setting_name": "High",
"setting_values": [{
"setting_synonym": ["high"],
"lang": "en"
}]
},{
"setting_name": "Medium",
"setting_values":[{
"setting_synonym":["medium"],
"lang": "en"
}]
},{
"setting_name": "Low",
"setting_values":[{
"setting_synonym":["low"],
"lang": "en"
}]
}],
"ordered": true
}]