Philips HUE Dial Switch - Control actions and volume of your media player

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

Here is my blueprint to use your philips hue dial switch (4button version)
You can use the blueprint to perform actions. Like control the volume with the dial of your mediaplayer. Like your sonos or google speaker.
Also the buttons you can program to call a service or perform actions like switching lights or whatever.

It is originally based on appollo1220 Philips Hue Tap Dial Switch - ZHA - Blueprints Exchange - Home Assistant Community (home-assistant.io)
Also used ZHA - Philips Hue Dial Switch with custom button actions - Blueprints Exchange - Home Assistant Community (home-assistant.io) for inspiration.
Although i wanted to control lights/or perform actions with the buttons AND control my mediaplayer with the dial. This blueprints works for me.

Note: The Philips Hue is connected directly to the Zigbee coordinator of my system. No use of the Philips HUB.

3 Likes

Should this work with a tap-dial connected through the hue hub?

Hi there, I have exactly the same question, does this work with a tap-dial connected through a Hue hub or via ZHA ?

I received one today and this blueprint doesn’t work with a tap-dial connected through a hue hub, but it works well in HA even without any blueprint, it just requires a bit more of typing into HA to configure the switch

No i directly connected it to HA with a Zigbee coordinator. Works best

Is it possible to include the step_size value in the turn wheel left and turnwheel right sequences so you can adjust volume in small, med, and large increments depending on how fast you spin the dial?

Welcome!
I know how to do it in node red, let me know if you need help.

Did anyone find a way to make the press and hold work?

I’m also looking for the long press.
A long press always triggers a left turn.

Sadly this is an error in the ZHA implementation. With Z2M I don’t have this problem…

1 Like

when I turn the wheel, it only increments the volume once, I need to stop turning the wheel and turn it again a second time for a second incrementation. Do you have the same issue?

this is normal. it wil only send the command if you stop spinning the wheel :frowning: .

well that really sucks… guess I need to move to Node-RED then

You can overcome this by setting the automation to run mode Parallel.

Here is my automation for inspiration:

alias: Sonos Kitchen(Køkken) and Living Room (Stue) Volume on Hue Tap Dial Switch
description: ""
trigger:
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: repeat
    subtype: clock_wise
    unique_id: 5e1ef413-d10e-4b64-8669-aede619718f2
    id: Volume-Up
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: repeat
    subtype: counter_clock_wise
    unique_id: 5e1ef413-d10e-4b64-8669-aede619718f2
    id: Volume-Down
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: initial_press
    subtype: 1
    unique_id: 35aaa0ec-27cc-4b33-89c8-79532d308bdf
    id: Play Musik I Køkken
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: start
    subtype: clock_wise
    unique_id: 5e1ef413-d10e-4b64-8669-aede619718f2
    id: Volume Up initially
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: start
    subtype: counter_clock_wise
    unique_id: 5e1ef413-d10e-4b64-8669-aede619718f2
    id: Volume Down initially
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: initial_press
    subtype: 2
    unique_id: 4422a570-4f5d-44d0-bbb2-a9cc5197e87f
    id: Play next
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: initial_press
    subtype: 3
    unique_id: dae5d653-4f68-4c78-9da5-80535a46b082
    id: Sonos Stue join Køkken
  - device_id: a10964bf3ca4c62896e022e231e2834e
    domain: hue
    platform: device
    type: initial_press
    subtype: 4
    unique_id: e5a00a1d-8db4-4bc7-b5bb-71618cfa9998
    id: Sonos Stue Unjoin Køkken
condition: []
action:
  - alias: >-
      Turnup volume on kitchen, if Kitchen is already playing do the same with
      Stue
    choose:
      - conditions:
          - condition: trigger
            id:
              - Volume-Up
              - Volume Up initially
        sequence:
          - if:
              - condition: state
                entity_id: media_player.stue
                state: playing
            then:
              - service: media_player.volume_up
                data: {}
                target:
                  entity_id:
                    - media_player.kokken
                    - media_player.stue
            else:
              - service: media_player.volume_up
                data: {}
                target:
                  entity_id: media_player.kokken
  - alias: >-
      Turnup down on kitchen, if Kitchen is already playing do the same with
      Stue
    choose:
      - conditions:
          - condition: trigger
            id:
              - Volume-Down
              - Volume Down initially
        sequence:
          - if:
              - condition: state
                entity_id: media_player.stue
                state: playing
            then:
              - service: media_player.volume_down
                data: {}
                target:
                  entity_id:
                    - media_player.kokken
                    - media_player.stue
            else:
              - service: media_player.volume_down
                data: {}
                target:
                  entity_id: media_player.kokken
  - choose:
      - conditions:
          - condition: trigger
            id: Play Musik I Køkken
        sequence:
          - service: media_player.media_play_pause
            data: {}
            target:
              entity_id: media_player.kokken
    alias: "Button 1 play music Køkken "
  - choose:
      - conditions:
          - condition: trigger
            id: Play next
          - condition: state
            entity_id: media_player.kokken
            state: playing
        sequence:
          - service: media_player.media_next_track
            data: {}
            target:
              entity_id: media_player.kokken
    alias: "Button 2 Play next "
  - alias: "Button 3 Stue joins Køkken "
    choose:
      - conditions:
          - condition: trigger
            id:
              - Sonos Stue join Køkken
        sequence:
          - service: media_player.join
            data:
              group_members:
                - media_player.stue
            target:
              entity_id: media_player.kokken
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Sonos Stue Unjoin Køkken
        sequence:
          - service: media_player.unjoin
            data: {}
            target:
              entity_id: media_player.stue
    alias: Button 4 Stue unjoins køkken
mode: parallel
max: 10

1 Like

thanks for the inspiration. I took this (much more elegant than parsing all the trigger_event.data.x info) and made a few mods including controlling multiple speakers and lights. happy to share the automation - im still cleaning it up a bit. That said, one suggestion to make the dial feel more responsive is to use set_volume and increase based on the speed of the dial turn. Here’s that code:

volume_level:  {{state_attr(states('MEDIA ENTITY HERE'), 'volume_level')
 - (trigger.event.data.steps / 1500)}}

Based on how the standard hue integration reports “steps” on dial rotation, ive found 1500 to be the sweet spot as a divisor.

Hey Dennis, from your description, you have created excactly what I have been trying to achieve but your import link for the blueprint seems to be broken! Could you please have a look at refreshing the link to the blueprint?

Sincerely, a man desperately wrestling to get media player integrated with the dial :grimacing:

I had the same issue - it seems to be caused by the space in the file name, “philips_tap_dial_switch volume-and-actions.yaml” - which is generally trouble in urls. Most browsers urlencode the space to ‘%20’, like in the original import button.

I suspect the My Home Assistant service recently stopped allowing urlencoding in links, probably for good security reasons, but it broke this. If you try to create that import link today, it says “invalid url”. However if you replace the ‘%20’ with an actual space, it renders it with a + and that works! :face_with_spiral_eyes:

Fixed import link
Source GitHub Link

Amazing, thank you persimmon!

1 Like

Hi guys. Is this link broken again? Not working for me…