Search code examples
google-smart-homegoogle-assistant

Google Smart Home Actions Toggle Trait


I am toggling horizontal swing and vertical swing in Hindi language, but assistant is not taking my command and always take me to a web page.

English Utterance: Start Horizontal Swing on Bedroom A/C. (working) Hindi Utterance: बैडरूम एसी के हॉरिजॉन्टल स्विंग को चालू कर दो.(not working)

I have given all the possible commands in Hindi related to toggle but its not working.

Below is my Google SYNC response:

{
  "requestId": "11311483680465073646",
  "payload": {
    "agentUserId": "123",
    "devices": [

      {
        "id": "stest240",
        "name": {
          "name": "Bedroom A/C",
          "defaultNames": [
            "Smart Air Conditioner"
          ]
        },
        "type": "action.devices.types.THERMOSTAT",
        "traits": [
          "action.devices.traits.OnOff",
          "action.devices.traits.TemperatureSetting",
          "action.devices.traits.Toggles"
        ],
        "willReportState": false,
        "deviceInfo": {
          "manufacturer": "smart-home",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        },
        "attributes": {
          "availableThermostatModes": [
            "cool",
            "dry",
            "fan-only"
          ],
          "thermostatTemperatureUnit": "C",
          "thermostatTemperatureRange": {
            "minThresholdCelsius": 16,
            "maxThresholdCelsius": 30
          },
          "availableToggles": [
            {
              "name": "horizontalswing",
              "name_values": [
                {
                  "name_synonym": [
                    "horizontal swing"
                  ],
                  "lang": "en"
                },
                {
                  "name_synonym": [
                    "हॉरिजोंटल स्विंग",
                    "हॉरिजॉन्टल स्विंग"
                  ],
                  "lang": "hi"
                }
              ]
            },
            {
              "name": "verticalswing",
              "name_values": [
                {
                  "name_synonym": [
                    "vertical swing"
                  ],
                  "lang": "en"
                },
                {
                  "name_synonym": [
                    "वर्टिकल स्विंग",
                    "वर्टीकल स्विंग"
                  ],
                  "lang": "hi"
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

Current Result: Command is executing in English only and not in Hindi when i a am toggling Horizontal swing and vertical swing. Expected Result : Command has to be executed in Hindi also when i am toggling Horizontal swing and vertical swing.


Solution

  • The toggle trait mentioned by you does have Hindi language support however there is still work going around to make this trait work with all possible kinds of hindi invocation. Your sync response looks good. I would recommend opening up an issue on the public issue tracker and we can then take it forward from there.