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

问题描述 投票:0回答:1

我正在将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'
      }
    }]
   }
 };
});
actions-on-google google-assistant-sdk google-smart-home nodejs-server smarthomeskill
1个回答
0
投票

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

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

{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": ["123"],
        "status": "ERROR",
        "errorCode": "valueOutOfRange"
      }
    ]
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.