Support for ColorSetting trait on non-Light device types

Our hood supports a backlight which supports full RGB color change. The backlight on/off switch was implemented with a trigger, and we implemented the ColorSetting trait to change the color.

When trying to use Google Assistant to change the color however, we get the reply 'It looks like the device hasn't been set up yet'. We tried changing the device type to 'Light', and the commands to change colors work flawlessly. Is the ColorSetting trait restricted to Light type only, and is there a workaround for this?

Thanks for your help

Edit: SYNC response for hood:

{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
      "agentUserId": "userID",
      "devices": [
          {
              "id": "HAID",
              "type": "action.devices.types.HOOD",
              "traits": [
                  "action.devices.traits.OnOff",
                  "action.devices.traits.StartStop",
                  "action.devices.traits.Modes",
                  "action.devices.traits.FanSpeed",
                  "action.devices.traits.Toggles",
                  "action.devices.traits.ColorSetting"
              ],
              "deviceInfo": {
                  "manufacturer": "MANUFACTURER",
                  "model": "MODEL",
                  "hwVersion": "",
                  "swVersion": ""
              },
              "name": {
                  "name": "Dunstabzugshaube",
                  "nicknames": [
                      "Dunstabzugshaube"
                  ],
                  "defaultNames": [
                      "Dunstabzugshaube"
                  ]
              },
              "willReportState": true,
              "attributes": {
                  "pausable": false,
                  "availableModes": [
                      {
                          "name": "program",
                          "name_values": [
                              {
                                  "name_synonym": [
                                      "program"
                                  ],
                                  "lang": "en"
                              }
                          ],
                          "settings": [
                              {
                                  "setting_name": "Auto",
                                  "setting_values": [
                                      {
                                          "lang": "en",
                                          "setting_synonym": [
                                              "auto",
                                              "automatic"
                                          ]
                                      }
                                  ]
                              },
                              {
                                  "setting_name": "circulation",
                                  "setting_values": [
                                      {
                                          "lang": "en",
                                          "setting_synonym": [
                                              "circulation",
                                              "ventilation",
                                              "airflow",
                                              "air flow"
                                          ]
                                      }
                                  ]
                              }
                          ],
                          "ordered": false
                      }
                  ],
                  "availableFanSpeeds": {
                      "speeds": [
                          {
                              "speed_name": "S1",
                              "speed_values": [
                                  {
                                      "lang": "en",
                                      "speed_synonym": [
                                          "fan stage 1",
                                          "Fan Stage 1",
                                          "lowest",
                                          "one"
                                      ]
                                  },
                                  {
                                      "lang": "de",
                                      "speed_synonym": [
                                          "lüfter stufe 1",
                                          "Lüfter Stufe 1",
                                          "minimum",
                                          "eins",
                                          "Stufe 1"
                                      ]
                                  }
                              ]
                          },
                          {
                              "speed_name": "S2",
                              "speed_values": [
                                  {
                                      "lang": "en",
                                      "speed_synonym": [
                                          "fan stage 2",
                                          "Fan Stage 2",
                                          "low",
                                          "two"
                                      ]
                                  },
                                  {
                                      "lang": "de",
                                      "speed_synonym": [
                                          "lüfter stufe 2",
                                          "Lüfter Stufe 2",
                                          "niedrig",
                                          "zwei",
                                          "Stufe 2"
                                      ]
                                  }
                              ]
                          },
                          {
                              "speed_name": "S3",
                              "speed_values": [
                                  {
                                      "lang": "en",
                                      "speed_synonym": [
                                          "fan stage 3",
                                          "Fan Stage 3",
                                          "medium",
                                          "three"
                                      ]
                                  },
                                  {
                                      "lang": "de",
                                      "speed_synonym": [
                                          "lüfter stufe 3",
                                          "Lüfter Stufe 3",
                                          "mittel",
                                          "drei",
                                          "Stufe 3"
                                      ]
                                  }
                              ]
                          }
                      ],
                      "ordered": true
                  },
                  "reversible": false,
                  "colorModel": "rgb",
                  "commandOnlyColorSetting": true,
                  "availableToggles": [
                      {
                          "name": "Light",
                          "name_values": [
                              {
                                  "name_synonym": [
                                      "light"
                                  ],
                                  "lang": "en"
                              }
                          ]
                      },
                      {
                          "name": "backlight",
                          "name_values": [
                              {
                                  "name_synonym": [
                                      "backlight",
                                      "mood light"
                                  ],
                                  "lang": "en"
                              },
                              {
                                  "name_synonym": [
                                      "Hintergrundbeleuchtung",
                                      "Stimmungslicht"
                                  ],
                                  "lang": "de"
                              }
                          ]
                      }
                  ]
              }
          }
      ]
  }
}

Best,
Frank

Upvotes: 0

Views: 82

Answers (1)

Siddhant Priyadarshi
Siddhant Priyadarshi

Reputation: 486

Your sync response provided above looks correct. Your concern about the command working flawlessly when you set the device type as LIGHT is because LIGHT does have a recommended trait as ColorSetting. To clarify your concern further, some device types do have better support for certain types of relevant grammar/language, which might explain why ColorSetting works better when the device type is set to light.

Google constantly works on the NLU (Natural Language Understanding) algorithms, so this grammar issue would be resolved by now and the ColorSetting trait should now be widely accessible to more devices.

More information about the HOOD and LIGHT device types and their associated traits along with sync, execute and query responses can be found here:

https://developers.google.com/assistant/smarthome/guides/hood

https://developers.google.com/assistant/smarthome/guides/light

Upvotes: 1

Related Questions