Use switch to play/pause music

Using a voice assistant to request the same radio station every day can be annoying. Physical switches or buttons make music control instant and effortless - just press and play.

Use cases

Daily Activities

  • Morning Music - One button press starts your day with favorite station
  • Shower Soundtrack - Instant music when you enter bathroom
  • Dinner Time - Stop music with single button press when meal is served

Focus & Relaxation

  • Workout Playlist - Start gym music without fumbling with phone
  • Reading Mode - Toggle relaxing background music on/off

Products needed

Essential Equipment

Smart Switch, Button, or Remote
Popular brands: Aqara, Flic, Hue Dimmer Switch, Inovelli, Zigbee buttons
Wall-mounted, portable, or wireless • Single or multi-button options
Smart Speaker/Music System
Brands: Sonos, Echo, Google Home, Apple HomePod
Single room or multi-room audio

Optional Enhancements

Multi-Button Remote
Different buttons for different playlists or volume control
Scene Controller
Combined lighting and music control

Basic automation setup

IF smart switch pressed THEN toggle music playback on speaker AND adjust volume to preset level

Triggers

  • Button/switch pressed
  • OR remote button clicked
  • OR switch turned on/off

Conditions (optional)

Note: Instant response typically desired
Time-based: Different playlists for different times
Home mode: Only when someone is home

Actions

  • Play specific playlist/station on designated speaker(s)
  • OR toggle play/pause current music
  • OR stop all music
  • Optional: Set volume to preset level
  • Optional: Adjust lights for ambiance

Platform-specific examples

Home Assistant logo

Home Assistant

Trigger Kitchen button pressed
Action Set speaker volume 40%, Play playlist
Option: Toggle play/pause for simple control
SmartThings logo

SmartThings

IF Button pressed (or switch on)
THEN Play music, Set volume to 40%
Toggle: IF playing → Pause, ELSE → Play
Hubitat logo

Hubitat

Trigger Button pressed
Action Set volume 40%, Play playlist
Setup: Use Button Controllers or Rule Machine
Apple HomeKit logo

Apple HomeKit

When Button is pressed
Do Play music on HomePod, Set volume 40%
Note: Best with Apple Music and HomePods
Alexa logo

Alexa

When Smart Home button pressed
Action Play music on Echo, Set volume to level 4
Google Home logo

Google Home

Starter Button pressed
Action Play music, Set volume to 40%

Advanced features

Context-aware music selection

Play different music based on time of day:

Create automation with time-based logic:

Multi-room audio control

Control multiple speakers with one button:

Create automation with these elements:

Button + light control

Combine music and lighting:

Create automation for movie mode:

Creative trigger ideas

Pressure sensor

Detect when you sit in favorite chair:

Create automation with these elements:

Presence detection

Entering specific room starts music:

Create automation with these elements:

NFC tag

Tap phone to NFC tag:

Create automation with these elements:

Troubleshooting

Issue: Button press doesn’t start music

Causes:

Solutions: ✅ Check button battery level in app ✅ Test button press - watch for trigger in automation logs ✅ Re-pair button if not responding ✅ Verify automation is enabled ✅ Test speaker manually - play music directly via app ✅ Check music service login (Spotify, Apple Music, etc.) ✅ Verify network connectivity for both button and speaker

Issue: Wrong music plays

Causes:

Check:

Fix:

Clear any current playback before starting new music:

  1. Stop current playback on speaker
  2. Wait 1 second
  3. Set volume to desired level (e.g., 40%)
  4. Play the correct playlist

Issue: Button has delay

Causes:

Solutions: ✅ Move button closer to hub or add Zigbee router/repeater ✅ Use local automation (Home Assistant, Hubitat) vs cloud (SmartThings cloud) ✅ Check hub CPU usage - restart if high ✅ Simplify automation - remove unnecessary conditions ✅ Test with different button placement ✅ Consider hardwired switch instead of battery button


Related automations: