-
Notifications
You must be signed in to change notification settings - Fork 0
/
IKEA_MUSIC_REMOTE_V0.2.yaml
68 lines (68 loc) · 1.81 KB
/
IKEA_MUSIC_REMOTE_V0.2.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
blueprint:
name: IKEA_MUSIC_REMOTE_v0.2
domain: automation
input:
remote:
name: Remote Control
description: Select the remote control you wish to use.
selector:
device:
integration: zha
manufacturer: IKEA of Sweden
model: Remote Control N2
multiple: false
mediaplayer:
name: Media Player
description: Select the Music Assistant Media Player.
selector:
target:
entity:
- domain: media_player
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input remote
action:
- choose:
- conditions: #Left Button - Previous Track
- '{{ command == ''press'' }}'
- '{{ cluster_id == 5 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [257, 13, 0] }}'
sequence:
- service: media_player.media_previous_track
target:
entity_id: !input mediaplayer
- conditions:
- '{{ command == ''press'' }}'
- '{{ cluster_id == 5 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [256, 13, 0] }}'
sequence: #Right Button - Next Track
- service: media_player.media_next_track
target:
entity_id: !input mediaplayer
- conditions: #Hold Top Button - Volume Up
- '{{ command == ''move_with_on_off'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
sequence:
- repeat:
#count: 10
sequence:
- service: media_player.volume_up
target: !input mediaplayer
- conditions: #Hold Bottom Button - Volume Down
- '{{ command == ''move'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
sequence:
- repeat:
#count: 10
sequence:
- service: media_player.volume_down
target: !input mediaplayer
default: []