智能家居温度设置读数(摄氏度)自定义范围

我正在将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'
      }
    }]
   }
 };
});
nhzjc 回答:智能家居温度设置读数(摄氏度)自定义范围

bufferRangeCelsius属性用于报告heatcool模式下两个设定值之间的最小差,并且不影响允许设定值的最小/最大范围(当文档提及范围,它们通常是指当前设定点之间的距离。

API当前不支持报告恒温器温度控制的全部支持范围。如果您的服务收到要求将温度设置为超出支持范围的请求,请返回valueOutOfRange错误响应:

{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf","payload": {
    "commands": [
      {
        "ids": ["123"],"status": "ERROR","errorCode": "valueOutOfRange"
      }
    ]
  }
}
本文链接:https://www.f2er.com/2953609.html

大家都在问