Search code examples
androidgoogle-smart-homegoogle-assistant

How do display a volume control for an Action in the Google Home app


I am developing a Smart Home Action and have managed to get my soundbar-like device to link in the Google Home app, where I can control its volume using voice commands. I do not see a volume control in the app though, like I do for other speaker-like devices such as the Google Home or my TV.

When I tap on my device in the Google Home app (linked as a test account), I just see Device Settings, and no controls at all.

This is the SYNC response for my device:

{
  "requestId": "7848726039212384681",
  "payload": {
    "agentUserId": "[email protected]",
    "errorCode": null,
    "debugString": null,
    "devices": [
      {
        "id": "[email protected]",
        "type": "action.devices.types.SOUNDBAR",
        "traits": [
          "action.devices.traits.OnOff",
          "action.devices.traits.MediaState",
          "action.devices.traits.Volume",
          "action.devices.traits.TransportControl"
        ],
        "name": {
          "defaultNames": null,
          "name": "Amplifier",
          "nicknames": null
        },
        "willReportState": false,
        "notificationSupportedByAgent": false,
        "roomHint": null,
        "deviceInfo": null,
        "attributes": {
          "transportControlSupportedCommands": [],
          "volumeMaxLevel": 100,
          "volumeCanMuteAndUnmute": false,
          "levelStepSize": 10,
          "queryOnlyOnOff": true
        },
        "customData": null,
        "otherDeviceIds": null
      }
    ]
  }
}

This is the QUERY response for my device:

{
  "requestId": "15675955780684435642",
  "payload": {
    "errorCode": null,
    "debugString": null,
    "devices": {
      "[email protected]": {
        "online": true,
        "status": "SUCCESS",
        "errorCode": null,
        "on": true,
        "currentVolume": 96
      }
    }
  }
}

Solution

  • Our teams are constantly working to improve Google Home App and the controls available in the UI. Right now for certain device types we are only able to display controls for certain traits. For these devices the controls are always available through voice. Your Sync response looks right for a soundbar device. If you need the touch controls for Soundbar devices, I recommend to create a feature request in the Public Issue Tracker.