我做了一个谷歌智能家居,可以用谷歌智能家居触摸屏控制热水器泵。它需要控制的是所需的温度和模式(开和关)。
我不能让“加热器”设备工作,所以我使用“恒温器”设备。
除了一件事:温度范围之外,一切都能正常工作。
在我的onSync请求中,我输入了一个介于60F°和104F°之间的范围,但它在设备上不起作用。
这是我的onSync请求。
function onSync(firebaseRef) { return async (body, headers) => {
return {
requestId: body.requestId,
payload: {
agentUserId: uId,
devices: [{
id: pId,
type: 'action.devices.types.THERMOSTAT',
traits: [
'action.devices.traits.TemperatureSetting',
],
name: {
defaultNames: ['My Heat Pump'],
name: 'Heat Pump',
nicknames: ['Pump'],
},
deviceInfo: {
manufacturer: 'test',
model: '1',
hwVersion: '1.0',
swVersion: '1.0.1',
},
willReportState: true,
attributes: {
// TemperatureSetting
availableThermostatModes: 'off,heat',
thermostatTemperatureRange: {
minThresholdCelsius: 15.555,
maxThresholdCelsius: 40.0
},
thermostatTemperatureUnit: 'F'
},
}],
},
};
}
}你知道怎样得到好的温度范围吗?
额外的好处:有可能有一个温度触摸控制与其他东西,如加热器?
发布于 2020-06-02 22:37:11
我在Reddit上得到了u/devunwired的回答:
在我的onSync请求中,我输入了一个介于60F和104F之间的范围,但它在设备上不起作用。这是一个已知的问题,Google Home应用程序当前不会呈现所提供的温度范围(语音查询中会考虑该值)。您可以在此处遵循(并开始)功能请求:b/154169625
https://stackoverflow.com/questions/62138116
复制相似问题