0

I'm programming vacuum cleaner with a mop feature. Currently, I set my device type to 'action.devices.types.VACUUM' and it responds to "clean" command. I would like to "mop" to the trigger list, but it seems the device type must be changed then.

Is it possible to see what commands trigger my device and extend the list?

Andrew Matiuk
  • 924
  • 1
  • 7
  • 21

1 Answers1

0

In the smart home platform, there's a distinction between device types and device traits.

You will have one type. In this case, I'm not sure how to handle it being a Mop and Vacuum.

Either way, you will be able to define any and all the traits you want, for whatever makes sense. If you want a "clean" command, you may go with the StartStop trait. ie. "OKG, start the vacuum mop". As Google defines the grammars, it expands to similar commands like "vacuum the kitchen".

But you can also define other traits regardless of device type. You can add the Brightness trait, the TemperatureSetting trait, etc.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • the goal is to make "mop the kitchen" "vacuum the kitchen" work on the same device but in different modes. Of course, I can say "set {device} mode to mop the floor" and then "clean my kitchen" but Google home is not that good to recognize both commands each-to-other. and it's longer than simple "mop my room" – Andrew Matiuk Sep 10 '19 at 14:24