One of Workflow’s least known functionalities is its ability to get details about the hardware it’s running on and control some system features. Among these, Workflow can both retrieve an iOS device’s current volume level and set the volume. A few days ago, I realized I could make a workflow to quickly adjust my iPhone’s volume when streaming music to one of our HomePods. Unlike other automations I’ve crafted over the years, this workflow was quite a success in our household and I felt like it was worth sharing with the wider MacStories audience.
It all started with a problem: my girlfriend and I like to listen to music at night before we go to sleep (usually around 1 AM) but we don’t want to disturb our neighbors downstairs. We’ve discovered that when we listen to the bedroom HomePod late at night, even moving from 20% volume to 17% or from 15% to 22% makes a difference for certain songs. Some songs are too loud and we need to lower the volume; others are too quiet and we don’t mind taking it up a notch.
Currently, iOS 11 and the Home app (where the HomePod’s main controls live) don’t offer a precise way to control system volume as a numeric value. I could use the built-in volume sliders, but they’re sloppy and don’t show you the volume percentage at all. I could use Siri, but I don’t want to talk every time I need to tweak the volume. Alternatively, I could tap the HomePod’s volume buttons, but those only adjust the speaker’s volume in 5% increments. By now you’ve probably realized that I’m a little particular about my nocturnal volume levels. And particular problems on iOS are often fixed with a familiar solution: automation via Workflow.
The workflow I put together consists of six actions that allow me to pick a new volume level from a list of presets, represented as values that range from 1 to 10. This workflow takes a second to run and it can be used directly from a widget without having to open the Workflow app. When you’re streaming audio to the HomePod, the volume change is instantly mirrored to the speaker.
This is accomplished by preparing a List action that contains your favorite volume presets. Because Workflow’s Set Volume action accepts any number between 0 and 1, all we need to do is divide the number by 10 to obtain a compatible value; 2 (which equals 20% volume) becomes 0.2, 1.75 becomes 0.175, and so forth. Thanks to the Choose from List action and Magic Variables, we can even display the current volume level in the title of the alert before picking a new value.
Unfortunately, the workflow comes with one big limitation. Currently, the Workflow app cannot connect directly to a HomePod and change its volume independently from an iOS device. Unlike iOS 11’s Control Center, which lets you switch output devices and have a separate audio stream on the HomePod that doesn’t interfere with system audio on your iOS device, Workflow can only change the system volume for the device it’s running on. This means that the workflow is only useful when you’re streaming audio directly to the HomePod; you can do this by tapping iOS’ AirPlay icon (either in apps or Control Center) and selecting the HomePod as output. This will be confirmed in the UI with a label such as ‘iPhone ⇾ LIVING ROOM’, where ‘Living Room’ is the name you’ve assigned to the HomePod.
Ideally, Workflow (which is owned by Apple) should be capable of controlling the HomePod’s volume separately from an iOS device, just like Control Center can. But then again Workflow should also come with HomeKit and Siri integrations, and we’re still waiting for its next big step. Despite this limitation, I’ve found my workaround to be good enough when I want to stream some music from my iPhone to the HomePod and have fine-grained volume controls that don’t involve voice commands. Plus, you can use this workflow to quickly adjust system volume when listening through any speaker or pair of headphones. I highly recommend installing it as a widget, which allows you to change volume through presets from anywhere on iOS, including Cover Sheet and the Lock screen.
You can download the workflow here.