smart-home-schema icon indicating copy to clipboard operation
smart-home-schema copied to clipboard

Command and state format differences in traits

Open casper2002casper opened this issue 4 years ago • 1 comments

States use oneOf to indicate there are multiple types while commands seem to use separate files instead. Could this be homologated as it's a bit annoying and confusing to have to work with both formats.

casper2002casper avatar Dec 20 '20 13:12 casper2002casper

states schema also specify the response to the QUERY intent so in that sense they should be able to describe all the states supported by the device (hence the oneOf when states can vary depending on attributes).

Would it be helpful to have dedicated per-command states schema in order to distinguish which state are affected by which command similar to what we already do with results (ex: https://github.com/actions-on-google/smart-home-schema/blob/master/traits/networkcontrol/getguestnetworkpassword.results.schema.json)

proppy avatar Jan 12 '21 02:01 proppy