繁体   English   中英

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

[英]Smart Home TemperatureSetting reading(celsius) custom range

我正在使用 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'
      }
    }]
   }
 };
});

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

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

{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": ["123"],
        "status": "ERROR",
        "errorCode": "valueOutOfRange"
      }
    ]
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM