You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
3.3 KiB
116 lines
3.3 KiB
2 weeks ago
|
blueprint:
|
||
|
name: IKEA Rodret Test
|
||
|
description: "
|
||
|
|
||
|
TEST Blueprint for IKEA RODRET
|
||
|
|
||
|
"
|
||
|
|
||
|
source_url:
|
||
|
domain: automation
|
||
|
input:
|
||
|
# REMOTE DEVICE
|
||
|
remote_device:
|
||
|
name: Remote
|
||
|
description: IKEA Rodret dimmer to use
|
||
|
default: ""
|
||
|
selector:
|
||
|
device:
|
||
|
filter:
|
||
|
integration: zha
|
||
|
manufacturer: IKEA of Sweden
|
||
|
model: RODRET Dimmer
|
||
|
multiple: false
|
||
|
# CLICK & HOLD OPTIONS
|
||
|
on_single_click_action:
|
||
|
name: On - Single Click Action
|
||
|
description: Choose action(s) to run when **on** button is clicked
|
||
|
default: []
|
||
|
selector:
|
||
|
action: {}
|
||
|
on_double_click_action:
|
||
|
name: On - Double Click Action
|
||
|
description: Choose action(s) to run when **on** button is double clicked
|
||
|
default: []
|
||
|
selector:
|
||
|
action: {}
|
||
|
on_click_hold_action:
|
||
|
name: On - Click Hold Action
|
||
|
description: Choose action(s) to run when **on** button is held after being clicked
|
||
|
default: []
|
||
|
selector:
|
||
|
action: {}
|
||
|
on_hold_action:
|
||
|
name: On - Hold Action
|
||
|
description: Choose action(s) to run when **on** button is held
|
||
|
default: []
|
||
|
selector:
|
||
|
action: {}
|
||
|
# HELPERS
|
||
|
helper_multi_click_delay:
|
||
|
name: Helper - Multi Click Delay
|
||
|
description: Max time (in milliseconds) between clicks
|
||
|
default: 250
|
||
|
selector:
|
||
|
number:
|
||
|
unit_of_measurement: milliseconds
|
||
|
min: 100.0
|
||
|
max: 5000.0
|
||
|
step: 10.0
|
||
|
mode: slider
|
||
|
mode: single
|
||
|
max_exceeded: silent
|
||
|
trigger_variables:
|
||
|
zha_remote: !input remote_device
|
||
|
trigger:
|
||
|
# ON CLICK
|
||
|
- platform: event
|
||
|
event_type: zha_event
|
||
|
event_data:
|
||
|
device_id: "{{ zha_remote }}"
|
||
|
command: "on"
|
||
|
cluster_id: 6
|
||
|
endpoint_id: 1
|
||
|
id: on-click-zha
|
||
|
action:
|
||
|
-choose:
|
||
|
- conditions: # ON CLICK ENTRY POINT
|
||
|
- condition: trigger
|
||
|
id:
|
||
|
- on-click-zha
|
||
|
sequence:
|
||
|
- wait_for_trigger:
|
||
|
- platform: event # SECOND CLICK
|
||
|
event_type: zha_event
|
||
|
event_data:
|
||
|
device_id: "{{ zha_remote }}"
|
||
|
command: "on"
|
||
|
cluster_id: 6
|
||
|
endpoint_id: 1
|
||
|
id: on-second-click
|
||
|
- platform: event # HOLD AFTER CLICK
|
||
|
event_type: zha_event
|
||
|
event_data:
|
||
|
device_id: "{{ zha_remote }}"
|
||
|
command: "move_with_on_off"
|
||
|
cluster_id: 8
|
||
|
endpoint_id: 1
|
||
|
args: [0, 83]
|
||
|
id: on-hold-after-click
|
||
|
timeout:
|
||
|
milliseconds: !input helper_multi_click_delay
|
||
|
continue_on_timeout: true
|
||
|
- choose:
|
||
|
- conditions: # NO SECOND CLICK
|
||
|
- condition: template
|
||
|
value_template: '{{ wait.trigger == none }}'
|
||
|
sequence: !input on_click_action
|
||
|
- conditions: # SECOND CLICK
|
||
|
- condition: template
|
||
|
value_template: '{{ wait.trigger == on-second-click}}'
|
||
|
sequence: !input on_double_click_action
|
||
|
- conditions: # HOLD AFTER CLICK
|
||
|
- condition: template
|
||
|
value_template: '{{ wait.trigger == on-hold-after-click }}'
|
||
|
sequence: !input on_click_hold_action
|