0

我正在使用 action.devices.types.THERMOSTAT 和 action.devices.traits.TemperatureSetting,我想将摄氏度的自定义范围设置为 16 到 28 是否可能?我尝试使用 bufferRangeCelsius 属性,但它对范围和默认摄氏度范围(从 10 到 32 出现)没有产生任何影响,我尝试过如下所示,

app.onSync((body, headers) => {
 return {
  requestId: body.requestId,
   payload: {
    agentUserId: '1836.15267389',
    devices: [{
     id: '123',
     type: 'action.devices.types.THERMOSTAT',
     traits: [
      'action.devices.traits.TemperatureSetting'
     ],
     name: {
     defaultNames: ['Honeywell Thermostat T-1000'],
     name: 'Homer Simpson Thermostat',
     nicknames: ['living room thermostat']
     },
     willReportState: false,
     attributes: {
      availableThermostatModes: 'off,heat,cool,on',
      thermostatTemperatureUnit: 'C',
      bufferRangeCelsius : 16-28
     },
     deviceInfo: {
      manufacturer: 'honeywell',
      model: 't-1000',
      hwVersion: '3.2',
      swVersion: '11.4'
     },
     customData: {
      fooValue: 74,
      barValue: true,
      bazValue: 'lambtwirl'
      }
    }]
   }
 };
});
4

1 回答 1

0

bufferRangeCelsius属性旨在报告heatcool模式中两个设定点之间的最小差异,并且不影响允许设定点的最小/最大范围(当文档提到范围时,它们通常是指当前设定点和设定点之间的距离) .

API 目前不支持报告恒温器温度控制的完整支持范围。如果您的服务收到将温度设置在支持范围之外的请求,则返回valueOutOfRange错误响应:

{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": ["123"],
        "status": "ERROR",
        "errorCode": "valueOutOfRange"
      }
    ]
  }
}
于 2019-12-09T18:11:20.857 回答