ZHA - Philips Hue Tap Dial Switch (RDM002) Custom, Light and Media mode

Introducing the Ultimate Hue Tap Dial Switch Blueprint: Unleash Your Home’s Potential!

Hey Home Assistant Enthusiasts,

I’m thrilled to share with you my first Blueprint, designed to take full advantage of the Hue Tap Dial Switch (RDM002) when paired with ZHA to create an unparalleled home automation experience. Imagine controlling your lights, media player, and custom actions—all from a single, sleek device. Let’s dive into the exciting features this Blueprint has to offer!

Links:

:page_with_curl: My GitHub Repo
:blue_book: This blueprint

Version:

  • 2025-02-04: Big v2 update with a lot of changes, see below
  • 2025-01-17: Implemented a way to use the Lights mode without setting up schedules and cleanup of old syntax
  • 2025-01-14: Initial Version

Highlights:

  • Custom Mode: Actions at Your Fingertips:
    Program the buttons to execute your personalized home automation routines, from controlling your shades to activating security modes.

  • Lights Mode: Seamless Control of Lights:
    Effortlessly dim, brighten, and change the color of your Hue lights depending on day and time of day with the intuitive dial, buttons and a schedule.

  • Media Mode: Media Player Magic:
    Turn on, turn off, skip tracks, and adjust volume with ease, making your entertainment experience smoother than ever.

Requirements:

  • Home Assistant 2024.10.0 or later: earlier versions don’t support the different button presses.
  • Text Helper: to be able to use the dial with each button. See below

Getting Started:

  1. Download & Install the Blueprint:
    Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

  2. Create a Text Helper:


    Also possible through YAML, see below.

  3. Select your Button and Text Helper

  4. Set settings per button:

  5. Customize Your Actions per button:

Use Home Assistant’s automation editor to fine-tune each button’s function to match your needs. Certain Custom Actions can still be used when Lights or Media mode is selected, see options.

  1. Customize Your Light per button:

Select the lights you want to control and change the default brightness, color_temp_kelvin and transition for the lights. If the light is already on and you press the button it will reset to the default.

You can also select a Schedule Helper you want to use for the On events. If your schedule doesn’t contain certain data it will revert to the defaults you set in the Blueprint. See below for an example in YAML for my Lights Bright and Lights Dimmed schedule, as you can see I have not set the transition in there as I don’t need to change it across the day.

  1. Customize Your Media Player per button:


A Personal Touch:

I started out with the Blueprint from this post, thanks for the hard work! And made some significant changes and added lots of functionality to make it even more versatile and powerful.

Helper setup:

I find it easy to split my config into packages, so I can easily find different yaml entities related to specific device type. You can include the following in your Home Assistant config:

homeassistant:
  packages: !include_dir_named packages

Make sure to create packages folder in your /config/ directory.

For the Text helper you can make a file called buttons.yaml for example and put the following inside: badkamer_knop and eettafel_knop are the names of my buttons in this example, but you can set whatever you like.

input_text:
  badkamer_knop_last_pressed:
    name: Badkamer Knop Last Pressed
    icon: mdi:knob
    min: 0
    max: 1
    mode: text
    pattern: "[1-4]"
  eettafel_knop_last_pressed:
    name: Eettafel Knop Last Pressed
    icon: mdi:knob
    min: 0
    max: 1
    mode: text
    pattern: "[1-4]"

For the Schedule helper you can make a file called lights.yaml for example and put the following inside:

schedule:
  lights_bright:
    name: "Lights Bright"
    icon: mdi:lightbulb-auto
    monday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    tuesday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    wednesday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    thursday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    friday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    saturday:
      - from: "00:00:00"
        to: "10:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "10:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
    sunday:
      - from: "00:00:00"
        to: "10:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
      - from: "10:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 90
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 60
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 30
          color_temp_kelvin: 3333
  lights_dimmed:
    name: "Lights Dimmed"
    icon: mdi:lightbulb-auto-outline
    monday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    tuesday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    wednesday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    thursday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    friday:
      - from: "00:00:00"
        to: "09:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "09:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    saturday:
      - from: "00:00:00"
        to: "10:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "10:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
    sunday:
      - from: "00:00:00"
        to: "10:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333
      - from: "10:00:00"
        to: "19:00:00"
        data:
          brightness_pct: 40
          color_temp_kelvin: 3333
      - from: "19:00:00"
        to: "23:00:00"
        data:
          brightness_pct: 20
          color_temp_kelvin: 3333
      - from: "23:00:00"
        to: "24:00:00"
        data:
          brightness_pct: 10
          color_temp_kelvin: 3333

You can of course make more schedules if needed and change the time slots, brightness_pct, color_temp_kelvin and transition to your liking.

Join the Community:

I can’t wait to see how you all use this Blueprint to enhance your smart homes. Please share your experiences, tips, and any creative uses you come up with. Together, we can make our homes smarter and more connected than ever!

Happy automating! :blush:

2 Likes

First big update. You can now use the Lights mode without setting up a schedule.

So only the Text Helper for the button presses is still needed to use this Blueprint. I am trying to figure out a way to be able to do this without the Text Helper so it is easier to use for new users.

Brilliant thanks, I was wondering why I couldn’t get this working and had missed that a schedule was essential for lights mode.

Would it be possible to have some very light customisation in the “Lights” mode? Ideally to have a single short press toggle the light on / off.

With the newer version of the blueprint the Schedule is not necessary anymore, you can now set the default start brightness, color_temp and transition directly in the blueprint, these will be used if the schedule is not set. If you don’t see those options reimport the blueprint.

I tried the short button press with Toggle first, but if you want to change between lights and the light is already on it will then turn the light off that is already on if you press that button. The way it is implemented currently, it will reset the light to the ‘default’ state set by the schedule or what you set manually.

I am planning to change the Blueprint to have ‘preset actions’ or ‘custom action’ per button press type instead of a full Custom/Light/Media mode, so it is more flexible to use. But this is quite a complete overhaul of the logic behind it, so will take some time.

That sounds fantastic, I look forward to the update! This is already by far the nicest integration for this device I’ve used and the only one I’ve been able to make fit my use case.

Figured that may be the case on short press = toggle having just scanned through the logic.

Well it took some days of work. But I have released basically a v2 of my Blueprint. You can reimport it over the old version but you will need to setup certain parts again.

The code has been optimised and more is now fully customisable.

Due to some changes it will not be fully compatible with the previous versions. Some entities have changed names to prevent the old stored settings causing issues. They will be ignored in the new blueprint.

There is no more Custom/Light/Media mode per button, but you can select different presets for the Light and Media mode per button. The presets are ignored if you don’t select a Light for the Light options or Media for the Media options. The Custom Actions are always run together with the other options you select. But can be empty if you don’t need Custom Actions.

I will update the instructions tonight.