-
Notifications
You must be signed in to change notification settings - Fork 0
/
remotec_bw8510.yaml
101 lines (101 loc) · 2.75 KB
/
remotec_bw8510.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
blueprint:
name: Remotec Scene master
description: Use the 8 button of remote for automations.
domain: automation
input:
zwave_js_node_id:
name: Node ID
description: "Enter the node id of the 8 button remote."
# Key 1
button_1_single:
name: Single Press Button 1
description: Action to run on a single button press.
default: []
selector:
action: {}
button_1_double:
name: Double Press Button 1
description: Action to run on a double button press.
default: []
selector:
action: {}
# Key 2
button_2_single:
name: Single Press Button 2
description: Action to run on a single button press.
default: []
selector:
action: {}
button_2_double:
name: Double Press Button 2
description: Action to run on a double button press.
default: []
selector:
action: {}
# Key 3
button_3_single:
name: Single Press Button 3
description: Action to run on a single button press.
default: []
selector:
action: {}
button_3_double:
name: Double Press Button 3
description: Action to run on a double button press.
default: []
selector:
action: {}
# Key 4
button_4_single:
name: Single Press Button 4
description: Action to run on a single button press.
default: []
selector:
action: {}
button_4_double:
name: Double Press Button 4
description: Action to run on a double button press.
default: []
selector:
action: {}
#
mode: queued
max: 1
max_exceeded: silent
#
variables:
node_id: !input zwave_js_node_id
#
trigger:
- platform: event
event_type: zwave_js_event
event_data:
type: value_notification
#
condition: "{{ trigger.event.data.node_id == (node_id | int ) }}"
#
action:
- variables:
key: "{{ trigger.event.data.property_key | int }}"
mode: "{{ trigger.event.data.value_raw }}"
- choose:
# Key 1
- conditions: "{{ key == 1 and mode == 0 }}"
sequence: !input button_1_single
- conditions: "{{ key == 1 and mode == 3 }}"
sequence: !input button_1_double
# Key 2
- conditions: "{{ key == 2 and mode == 0 }}"
sequence: !input button_2_single
- conditions: "{{ key == 2 and mode == 3 }}"
sequence: !input button_2_double
# Key 3
- conditions: "{{ key == 3 and mode == 0 }}"
sequence: !input button_3_single
- conditions: "{{ key == 3 and mode == 3 }}"
sequence: !input button_3_double
# Key 4
- conditions: "{{ key == 4 and mode == 0 }}"
sequence: !input button_4_single
- conditions: "{{ key == 4 and mode == 3 }}"
sequence: !input button_4_double