Files
hass-blueprints/hue-dimmer-switch.yaml
2025-01-06 13:06:55 +01:00

125 lines
3.0 KiB
YAML

blueprint:
name: Hue Dimmer Switch with Hue text
domain: automation
description: Blueprint for configuring the new style hue dimmer switch
input:
remote_target:
name: Remote
selector:
device:
filter:
- integration: zha
model: RWL022
light_target:
name: Light
selector:
entity:
filter:
- domain: light
number_helper:
name: Number helper
selector:
entity:
filter:
- integration: input_number
triggers:
- device_id: !input remote_target
domain: zha
type: remote_button_short_press
subtype: turn_on
trigger: device
id: toggle_light
- device_id: !input remote_target
domain: zha
type: remote_button_long_press
subtype: dim_up
trigger: device
id: start_dim_up
- device_id: !input remote_target
domain: zha
type: remote_button_long_release
subtype: dim_up
trigger: device
id: stop_dim_up
- device_id: !input remote_target
domain: zha
type: remote_button_long_press
subtype: dim_down
trigger: device
id: start_dim_down
- device_id: !input remote_target
domain: zha
type: remote_button_long_release
subtype: dim_down
trigger: device
id: stop_dim_down
- device_id: !input remote_target
domain: zha
type: remote_button_short_press
subtype: turn_off
trigger: device
id: toggle_profile
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- toggle_light
sequence:
- action: light.toggle
metadata: {}
data: {}
target:
entity_id: !input remote_light
- conditions:
- condition: trigger
id:
- start_dim_up
sequence:
- repeat:
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: 3
transition: 1
target:
entity_id: !input remote_light
until:
- condition: trigger
id:
- stop_dim_up
- conditions:
- condition: trigger
id:
- start_dim_down
sequence:
- repeat:
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 1
brightness_step_pct: -3
target:
entity_id: !input remote_light
until:
- condition: trigger
id:
- stop_dim_down
- conditions:
- condition: trigger
id:
- toggle_profile
sequence:
- action: script.cycle_between_light_profiles
metadata: {}
data:
light: !input remote_light
helper: !input number_helper
mode: restart