Search code examples
actions-on-googletraitsmodegoogle-smart-home

Is there any way to make some mode trait modes queryOnlyModes and others not?


After reviewing the Google Actions API docs, I am seeing that the mode trait supports queryOnlyModes meaning the modes cannot be edited and can only be QUERIED.

Setting this on the mode trait makes all modes queryOnlyModes.

Our device has multiple different modes, each is pretty unique and we want to be able to set some of them to be "query only" while setting others to be able to be adjusted by the user.

Does anyone know whether this is supported or how this could be implemented?

Any help or info is appreciated. Thanks.


Solution

  • You are not able to set queryOnly at the level of individual modes. However, if you do get a command that cannot be done, you can return an error as the response with a code like functionNotSupported to let the user know the command was acknowledged.