Google Home - Is reporting state mandatory?

别等时光非礼了梦想. 提交于 2020-05-16 20:11:32

问题


I'm trying to validate our integration with Google Home, and as it turns out, the smart home test suite expects reporting state to be implemented. AFAIK, this is not necessary, but evidently, at least for this test suit, it is. I'm always reporting "willReportState" as false, which should be fine, and the test suite skips most devices because of this, but for some reason, it still expects thermostats to report state.

Does this mean that the only way to get our integration approved and listed is if we implement a reporting state?

Here's an example of the sync for a thermostat:

{ 
   "id":"112299",
   "type":"action.devices.types.THERMOSTAT",
   "traits":[ 
      "action.devices.traits.OnOff",
      "action.devices.traits.TemperatureSetting"
   ],
   "name":{ 
      "name":"Calefacción Agus"
   },
   "willReportState":false,
   "attributes":{ 
      "availableThermostatModes":"off,heat",
      "thermostatTemperatureUnit":"C"
   },
   "roomHint":"Cuarto Agus",
   "deviceInfo":{ 
      "model":"HPA-4412",
      "swVersion":""
   }
}

Thanks!


回答1:


Report state is a requirement for submitting your smart home action unless your device traits use the commandOnly<TraitName> attribute and do not know the state.

For example, some devices like an IR blaster may only know how to send commands and don't know the state, so it would use OnOff with the commandOnlyOnOff attribute.



来源:https://stackoverflow.com/questions/59508379/google-home-is-reporting-state-mandatory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!