Add other blueprint
This commit is contained in:
133
hue-dimmer-switch-2.yaml
Normal file
133
hue-dimmer-switch-2.yaml
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
blueprint:
|
||||||
|
name: Hue Dimmer Switch with separate on/off
|
||||||
|
domain: automation
|
||||||
|
description: Blueprint for configuring the old style hue dimmer switch
|
||||||
|
input:
|
||||||
|
remote_target:
|
||||||
|
name: Remote
|
||||||
|
selector:
|
||||||
|
device:
|
||||||
|
filter:
|
||||||
|
- integration: zha
|
||||||
|
model: RWL021
|
||||||
|
|
||||||
|
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: turn_on
|
||||||
|
- 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: turn_off
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- turn_on
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: !input light_target
|
||||||
|
state: "on"
|
||||||
|
then:
|
||||||
|
- action: script.cycle_between_light_profiles
|
||||||
|
data:
|
||||||
|
light: !input light_target
|
||||||
|
helper: !input number_helper
|
||||||
|
else:
|
||||||
|
- action: light.turn_on
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: !input light_target
|
||||||
|
- 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 light_target
|
||||||
|
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 light_target
|
||||||
|
until:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- stop_dim_down
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- turn_off
|
||||||
|
sequence:
|
||||||
|
- action: light.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
entity_id: !input light_target
|
||||||
|
mode: restart
|
||||||
Reference in New Issue
Block a user