我从同步中得到以下答案:
当我使用Google Home mini或模拟器并说将风扇设置为低速时,我收到该设备不支持该功能。有谁能够帮助我 ?文档似乎是问题所在
{
id: '123',
type: 'action.devices.types.FAN',
traits: [
'action.devices.traits.FanSpeed',
'action.devices.traits.OnOff'
],
name: {
defaultNames: ['Sirius Cybernetics Corporation 33321'],
name: 'Fan',
nicknames: ['wall fan']
},
willReportState: true,
attributes: {
availableFanSpeeds: {
speeds: [{
speed_name: 'Low',
speed_values: [{
speed_synonym: ['low', 'slow'],
lang: 'en'
}, {
speed_synonym: ['low', 'slow'],
lang: 'de'
}]
}, {
speed_name: 'High',
speed_values: [{
speed_synonym: ['high'],
lang: 'en'
}, {
speed_synonym: ['high'],
lang: 'de'
}]
}],
},
reversible: true
},
deviceInfo: {
manufacturer: 'Sirius Cybernetics Corporation',
model: '492134',
hwVersion: '3.2',
swVersion: '11.4'
},
}
编辑: 我忘了说工作顺利。
答案 0 :(得分:0)
您缺少属性'ordered'
,请参见下文
attributes: {
availableFanSpeeds: {
speeds: [{
speed_name: 'Low',
speed_values: [{
speed_synonym: ['low', 'slow'],
lang: 'en'
}, {
speed_synonym: ['low', 'slow'],
lang: 'de'
}]
}, {
speed_name: 'High',
speed_values: [{
speed_synonym: ['high'],
lang: 'en'
}, {
speed_synonym: ['high'],
lang: 'de'
}]
}],
'ordered':true
},
reversible: true
}