-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-automation-foh-lp.yaml
63 lines (63 loc) · 1.99 KB
/
package-automation-foh-lp.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
automation:
alias: Emulate LongPress on FoH Switches
description: ''
trigger:
- platform: event
event_type: hue_event
event_data:
type: initial_press
- platform: event
event_type: hue_event
event_data:
type: long_press
condition: []
action:
- wait_for_trigger:
- platform: event
event_type: hue_event
event_data:
id: |
{% set long_release=false %}{{trigger.event.data.id}}
device_id: |
{{trigger.event.data.device_id}}
unique_id: |
{{trigger.event.data.unique_id}}
type: short_release
subtype: |
{{trigger.event.data.subtype}}
timeout:
milliseconds: 1000
- choose:
- conditions:
- condition: template
value_template: '{{wait.trigger.event.data.type == "short_release"}}'
sequence:
- event: hue_event
event_data:
id: |
{{trigger.event.data.id}}
device_id: |
{{trigger.event.data.device_id}}
unique_id: |
{{trigger.event.data.unique_id}}
type: |
{% if trigger.event.data.type == "initial_press" %}
short_press
{% else %}
long_press_release
{% endif %}
subtype: |
{{trigger.event.data.subtype}}
default:
- event: hue_event
event_data:
id: |
{{trigger.event.data.id}}
device_id: |
{{trigger.event.data.device_id}}
unique_id: |
{{trigger.event.data.unique_id}}
type: long_press
subtype: |
{{trigger.event.data.subtype}}
mode: restart