Skip to content

Instantly share code, notes, and snippets.

@pugson
Last active June 2, 2024 21:03
Show Gist options
  • Save pugson/c75f36cd20d81c18ac7080d865187bae to your computer and use it in GitHub Desktop.
Save pugson/c75f36cd20d81c18ac7080d865187bae to your computer and use it in GitHub Desktop.

Home Assistant: Philips Hue Tap Dial Light Brightness Control (through the native Hue Bridge integration)

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

  • Control a light's brightness with the rotary dial of the Hue Tap Dial switch with this blueprint.
  • No Zigbee hardware required.
  • It only handles the dial rotation without the button presses.
  • You need to create a new text helper. Inside that text helper, you have to type in the light entity ID.

CleanShot 2024-06-02 at 10 56 20 PM@2x

Based on this blueprint from the forums.

blueprint:
name: Philips Hue Tap Dial Light Brightness Control
description: Use the Philips Hue Tap Dial to control the brightness of a light.
domain: automation
input:
tap_dial:
name: Tap Dial
description: The tap dial to use. Select the battery sensor that is exposed.
selector:
entity:
multiple: false
filter:
- domain: sensor
integration: hue
light_target:
name: Target Light
description: The light to control brightness with the dial.
selector:
entity:
multiple: false
filter:
- domain: light
helper_input:
name: Helper Input
description: You will need to create an input_text helper for this blueprint. Select it here.
selector:
entity:
multiple: false
filter:
- domain: input_text
variables:
tap_dial_used: !input tap_dial
light_target: !input light_target
helper_input: !input helper_input
mode: parallel
trigger:
- platform: event
event_type: hue_event
condition:
- condition: template
value_template: >-
{{ trigger.event.data.device_id == device_id(tap_dial_used) }}
action:
- variables:
action: "{{ trigger.event.data.type }}"
action_sub: "{{ trigger.event.data.subtype }}"
action_steps: "{{ trigger.event.data.steps }}"
- choose:
- conditions:
- condition: template
value_template: "{{ action == 'short_release' }}"
sequence:
- service: input_text.set_value
metadata: {}
data:
value: !input light_target
target:
entity_id: !input helper_input
- choose:
- conditions:
- condition: template
value_template: "{{ action_sub == 'clock_wise' }}"
sequence:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: "{{ (trigger.event.data.steps / 750) * 100 }}"
target:
entity_id: "{{ states(helper_input) }}"
- conditions:
- condition: template
value_template: "{{ action_sub == 'counter_clock_wise' }}"
sequence:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: "{{ (trigger.event.data.steps / 750) * -100 }}"
target:
entity_id: "{{ states(helper_input) }}"
max: 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment