-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
80 lines (80 loc) · 1.93 KB
/
scripts.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
spotify_transfer:
alias: Spotify Transfer
sequence:
- service: media_player.select_source
metadata: {}
data:
source: '{{ target_source }}'
target:
entity_id: media_player.spotify
mode: single
fields:
target_source:
selector:
select:
options:
- Pioneer (Kamil)
- iPhone
name: target_source
required: true
amp_play:
alias: AMP Play
icon: 'mdi:speaker-play'
sequence:
- service: script.spotify_transfer
data:
target_source: 'Pioneer (Kamil)'
continue_on_error: true
- delay:
seconds: 2
- service: media_player.media_play
target:
entity_id: media_player.spotify
amp_stop:
alias: AMP Stop
icon: 'mdi:speaker-stop'
sequence:
- service: script.spotify_transfer
data:
target_source: 'iPhone'
continue_on_error: true
- delay:
seconds: 2
- service: media_player.media_pause
target:
entity_id: media_player.spotify
continue_on_error: true
- service: media_player.turn_off
target:
entity_id: media_player.pioneer
home_welcome:
alias: Welcome Home
icon: 'mdi:human-greeting'
sequence:
- action: script.turn_on # non-blocking call
target:
entity_id: script.amp_play
- choose:
- conditions: "{{ not '05:00' < states('sensor.time') < '21:00' }}"
sequence:
- action: scene.turn_on
target: # IF evening - late time
entity_id: scene.lights_evening
- conditions: "{{ state_attr('sun.sun', 'elevation') < 5 }}"
sequence:
- action: scene.turn_on
target: # ELIF evening - sun-based
entity_id: scene.lights_dinner
- action: light.turn_on
target:
entity_id: light.wardrobe
home_leave:
alias: Leave Home
icon: 'mdi:exit-run'
sequence:
- action: script.turn_on # non-blocking call
target:
entity_id: script.amp_stop
- action: scene.turn_on
target:
entity_id: scene.lights_off