Search code examples
actions-on-google

Smart Home modes trait not show in UI


I add the Modes trait and some settings to my device, but the UI doesn't show any option. Also I have tried with Toogle trait and it doesn't show it either. (I have my assistant in Spanish, and when I select the supported language in the SYNC, I specified 'es' tag).

This is my SYNC response:

{
   "requestId":"8280087254750701149",
   "payload":{
       "agentUserId":2,
       "devices":[{
            "id":"34",
            "type":"action.devices.types.OUTLET",
            "traits":["action.devices.traits.OnOff","action.devices.traits.Modes"],
            "attributes":{
                  "availableModes":[{
                       "name":"auxiliar",
                       "name_values":[{
                            "name_synonym":["auxiliar"],
                            "lang":"es"
                        }],
                        "settings":[{
                            "setting_name":"encendido",
                            "setting_values":[{
                                 "setting_synonym":["encendido"],
                                 "lang":"es"
                            }]
                        },
                        {
                            "setting_name":"apagado",
                            "setting_values":[{
                                 "setting_synonym":["apagado"],
                                 "lang":"es"
                            }]
                        },
                        {
                            "setting_name":"suspendido",
                            "setting_values":[{
                                 "setting_synonym":["suspendido"],
                                 "lang":"es"
                            }]
                        }],
                        "ordered":true
                  }]
            },
            "name":{
                 "defaultNames":["EVVC200000091"],
                 "name":"Cargador laboratorio",
                 "nicknames":["cargador_labo"]
            },
            "willReportState":true,
            "deviceInfo":{
                 "manufacturer":"Orbis",
                 "swVersion":"00.01.31"
            },
            "customData":{
                 "serial":"EVVC200000091",
                 "fooValue":74,
                 "barValue":true,
                 "bazValue":"foo"
            }
       }]
   }
}

This is my QUERY response:

{"requestId":"15972376619501000208","payload":{"devices":{"34":{"currentModeSettings":{"auxiliar":"encendido"},"on":true}}}}

And the UI not show any option: enter image description here


Solution

  • Not every device trait is supported on every surface with touch controls. You should look at the documentation for touch controls. Note that Modes and Toggles are not on the list for supported traits.