ZHA - Philips Hue Tap Switch Mini - Media Controls (RDM002)

Important Note: RMD002 support is added to the November 2024 release of Home Assistant. This blueprint will not work with earlier versions.

Version History:

  • 1.00 (Nov-02-2024) : Initial Release
  • 1.01 (Nov 22-2024) : Fixed multi-press button events
  • 1.02 (Jan-16-2024) : Ignore spurious rotation events. Fix errors caused by reading non-existent params. Increase allowed values for Small and Medium Rotation Maximums from 100 to 255 to accommodate large rotation values. Minor cleanups
  • 1.03 (Jan-18-2025) : New feature - under volume controls, a new toggle to limit volume changes to when the media player is actively playing.
    Thank you stephane1 for the suggestion!

This blueprint enables simple control of a media player using a Philips Hue Tap Dial (RDM002) control. In addition to controlling a media player, you can provide custom automations for long press and long release as well as single, double, triple, quadruple, and quintuple presses of the controller buttons that aren’t pre-configured for media control.

I’ve made another blueprint which allows for full customization without assuming a media player. That blueprint can be found here: ZHA - Philips Hue Tap Switch Mini - Custom Controls (RDM002)

How To:

  • Install the blueprint
  • Select the your RDM002 controller and the “Media Player” you’d like to control. This can be any “Media Player” device which includes Sonos, Roon, and many others
  • Button 1 will now act as play/pause. Button 3 will act as “Previous Track”. Button 4 will act as “Next Track”. The rotating dial will control volume
  • The dial will do velocity-sensitive volume control based on your speed of rotation. You can configure this precisely using the blueprint - detailed instructions are provided within the blueprint itself
  • Provide any custom automations you want for additional single, double, triple, and quadruple button presses

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

This is an image of the blueprint’s UI for configuring volume controls:

This is how the blueprint supports configuring custom actions. This is for “Button 2” for which all custom actions are available. Buttons 1, 2, and 4 don’t have options for short presses since those are dedicated to Play/Pause, Previous Track, and Next Track:

Blueprint code is available at this gist.

3 Likes

Hi

Huge fan of this blueprint!
Thanks a lot!

I am using it with spotify and several grouped Denon/HEOS speakers.

I noticed the following:
My spotify media player remains unresponsive after the button 1 short-press if it is in “idle” state. Music does not play.

Available media_player attributes in “idle” state:

As a workaround I added the following condition to the blueprint, which sets the player’s state to “paused”.
(I inserted that condition right after the definition of the variables.)

if:
  - condition: state
    entity_id: media_player.spotify_take_5
    state: "idle"
then:
  target:
    entity_id: media_player.spotify_take_5
  data:
    source: MySpeakerGroup
  action: media_player.select_source

(I am a home assistant newbie, so there might be more elegant solutions.)

In the “paused” state, media-related attributes and a source are available and music starts playing.

Issue might be similar to this:

If you could add the option to select a default speaker group for cases where “source” is available because of the player’s idle state, that would be great!

1 Like

Thanks for this feedback! I’m traveling now and can’t look at this - I’ll take a look when I’m back home in a week or so. Thanks again!

This blueprint has been updated to fix an issue with multi-press events. If you’ve previously imported this blueprint, you should be able to install the updated version by re-installing using the installation button in the first post and choosing to override your existing blueprint.

1 Like

Hi, @take5

I’m glad you’re enjoying the blueprint! Sorry for the slow response - I just got back from a couple of weeks of vacation.

I took a look at your suggestion for supporting the “idle” state. The problem with the “idle” state, as you may have already figured out, is that the Home Assistant “Media Player” documentation defines “Idle” as:

The media player is turned on and accepting commands, but currently not playing any media. Possibly at some idle home screen.

The documentation is here: Media player - Home Assistant

This means that there is no standard behavior for making it “play” because there is nothing to play. If you, for example, were to use the Spotify app, or some other strategy, to start music playing, then button 1 would behave as expected. I don’t think I can modify this blueprint with your suggestion and have that work in the general case. So I think I should leave it as is.

If you find that the behavior you added works specifically for your Spotify case, then I have a couple of suggestions

  • Because you added the code that you created immediately after the variables, it will run whenever this automation runs, which means on any button press or dial rotation. That’s probably not what you want.

  • You could add this code as a button 2 behavior or a behavior of any double, triple, etc. button press. For example, when Spotify is in the “Idle” state, you could double press the play / pause button to get it selected or whatever. You can extend it to do whatever you like. Once it’s playing, I hope that the play/pause behavior of button 1 will work. That behavior simply, as I’m sure you’ve seen, just uses the media player’s “toggle” behavior which transitions between playing and paused states.

  • If you don’t like the idea of a new button behavior, you can check out my other blueprint which isn’t specific to media controls. You can make button 1 behave exactly as it makes sense for it to behave for your setup. You would also need to implement volume changes, but that’s pretty easy with the other blueprint, too. That blueprint is available here: ZHA - Philips Hue Tap Switch Mini - Custom Controls (RDM002)

Thanks again for using this and I hope this helps!

Minor update posted today. Fixed an issue in which a long button press could also generate a spurious rotation event. This appears to be a firmware bug and will liekly be fixed in an upcoming Home Assistant release. Until then, this blueprint detects and ignores those events.

Other small cleanups.

Another update. Added the ability, under the Volume Controls section, to limit volume changes to times when the player is actively playing.

Thank you @stephane1 for the suggestion!

Hi, thanks so much for the brilliant blueprint! I don’t know if I’m doing anything wrong but when I set up the automation to toggle a light, or group of lights, it does not work when I press the button on the tap device but the automation does run if I activate it manually in the home assistant app.

The button press is correctly registered in the log:

tap Remote Button Short Release - Button 4 event was fired

And

tap Remote Button Short Release - Button 4 event was fired

Is there anything I’m doing wrong or is that toggle action not possible?

Hi, @space-dementia.

This blueprint has pre-defined behaviors for presses of buttons 1 (play/pause), 3 (prev track), and 4 (next track).

It doesn’t allow the user to specify a behavior for a simple press of button 4. If you look at the blueprint section for button 4, you’ll note that you can only set the behaviors for a long press, double press, triple press, quintuple press.

So it may be that you have set up an automation for a long press but you’re expecting it to run on a short press.

One way to figure this out is to edit the blueprint and select the three dots in the upper right corner and choose “Edit in YAML”. You’ll be able to see clearly how your automation is configured.

This blueprint is intended primarly for people who want to use the controller to control a media player. That’s why it reserves the actions of simple presses of 1, 3, 4. If you want full customization of the controller, including being able to make a short press of any button do whatever you want, then the other blueprint I created for this controller may be a better choice. It’s here:

Hope this helps.

Brilliant, thanks so much for pointing me that way - sounds like that’s exactly what I need!

1 Like

These seem awesome, however, I have my dial set up through Zigbee2MQTT not ZHA. Is there any chance we can get a Zigbee2MQTT version of both your blueprints?

Would it be possible improve the blueprint so that it’s possible to edit short-presses? (Instead of fixed controls as now.)
I did check out your other “custom controls” blueprint. My problem is that I want the volume-control in this blueprint (it even acceps 0.5 as a minimum step size which matches my amplifier) But I want the freedom to alter the buttons from the other blueprint.

Maybe it would even be able to combine the two into one blueprint?

I guess I’m asking a lot, but then again I’m probably not the only one who would apreciate this.

Hi, I’m considering getting one of these devices to use primarily as a volume control for a media device in HA. Can anyone comment on responsiveness of the dial when it’s used in this way ?

Does it work well enough to be used like a normal volume control, or do you have to take a bit of care to avoid overshooting due to laggy response ? While I could personally cope with that, there are other household members who might not :slight_smile:

It already exists, but based on the latest comments in the thread it does not look to be working anymore.

@gTunes Do you plan on updating your Z2M version ?

I use it for my Sonos PlayBase and it’s instant

1 Like

Thanks for the feedback. I’ve now bought one of these and I’m using it with @gTunes Media Player Blueprint, and absolutely loving it.

The convenience of having a simple rotary dial and buttons that will control whatever you’re listening to, rather than having to dig out the right remote/app/whatever is a great example of what Home Automation is about.

This is a really good blueprint. I’m experimenting with it, trying to replicate some of the behaviors I get using a Tap Dial natively paired with a Hue Bridge.

Using the dial CW and CCW as brightness increase and decrease are the big challenges. I’ve got these set up to do 3% 15% and 30% brightness increase/decrease for small, medium, and large rotations. This is about right, but I’ve got a weird behavior.

When I rotate sort of quickly and then try to slow down to get the exact brightness I want, it triggers an opposite rotation event. For example, saying I’m rapidly increasing the brightness and I slow down as I approach the brightness level I want. Instead of just increasing slowly, the brightness stops going up, goes down, and then goes up again. Sometimes I goes down again after I stop the rotation.

Any idea what I’m doing wrong to be triggering opposite direction rotations?

Thanks.

@gTunes This blueprint is working really well for me, but a minor niggle is that it throws a system log entry every time it’s used:

2025-07-19 14:32:30.034 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: ‘logbook_enabled’ is undefined when rendering ‘{{ logbook_enabled and not bad_step_event }}’

You’re absolutely right. Thanks for pointing this out. I’ve uploaded a new gist. You can install by re-importing using the button in the first post. The update fixes the spurious warnings and also cleans up logbook events when they’re enabled in the blueprint.

Thanks again!

I haven’t been able to reproduce this. If you’re still seeing the issue, can you import the latest version with the button in the first post, enable “Logbook” in the blueprint, and and reproduce the issue? I’m interested in seeing if the reverse event is showing up in logbook. Thanks!