forked from matt8707/hass-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
168 lines (152 loc) · 4.83 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
dator_on:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_dator
- service: switch.toggle
entity_id: switch.switchbot
dator_off:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_dator
- service: shell_command.imac_turn_off
tv_on:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_tv
- service: media_player.turn_on
entity_id: media_player.sony_bravia_tv
tv_off:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_tv
- service: media_player.turn_off
entity_id: media_player.sony_bravia_tv
playstation_on:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_playstation
- service: media_player.turn_on
entity_id: media_player.playstation_4
playstation_off:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.loading_playstation
- service: media_player.turn_off
entity_id: media_player.playstation_4
dummy:
sequence:
- delay: '00:00:00'
auto_hemma:
sequence:
- service: automation.turn_off
entity_id:
['automation.ui_sound_on', 'automation.ui_sound_off', 'automation.ui_sound_popup']
- service: tts.google_translate_say
entity_id: media_player.tablet
data_template:
message: >
{% if is_state('switch.fullykiosk_screen', 'on') %}
"{{ ['Hej', 'Startar', 'Värmer upp', 'Välkommen hem'] | random }}"
{% else %}
{% endif %}
- service: scene.turn_on
data_template:
entity_id: >
{% if is_state('sun.sun', 'below_horizon') %}
scene.hemma_below_horizon
{% else %}
scene.hemma_above_horizon
{% endif %}
- delay: '00:00:02'
- service: automation.turn_on
entity_id:
['automation.ui_sound_on', 'automation.ui_sound_off', 'automation.ui_sound_popup']
auto_stang_allt:
sequence:
- service: automation.turn_off
entity_id:
['automation.ui_sound_on', 'automation.ui_sound_off', 'automation.ui_sound_popup']
- service: tts.google_translate_say
entity_id: media_player.tablet
data_template:
message: >
{% if is_state('switch.fullykiosk_screen', 'on') %}
"{{ ['Ha det', 'Hejdå', 'Saknar-dig redan', 'Stänger-ner allt'] | random }}"
{% else %}
{% endif %}
- service: light.turn_off
entity_id: light.alla_lampor_utom_hall
- service: switch.turn_off
entity_id: switch.wemo_flakt
- service: switch.turn_off
entity_id: switch.wemo_monitorer
- service_template: >-
{% if is_state('switch.dator_template', 'on') %}
script.dator_off
{% endif %}
- service_template: >-
{% if is_state('switch.playstation_template', 'on') %}
script.playstation_off
{% endif %}
- service_template: >-
{% if is_state('switch.tv_template', 'on') %}
script.tv_off
{% endif %}
- delay: '00:00:03'
- service: automation.turn_on
entity_id:
['automation.ui_sound_on', 'automation.ui_sound_off', 'automation.ui_sound_popup']
reference_monitors:
sequence:
- service: shell_command.reference_click
- service: shell_command.reference_kill
- service: shell_command.reference_monitors
reference_headphones:
sequence:
- service: shell_command.reference_click
- service: shell_command.reference_kill
- service: shell_command.reference_headphones
homeassistant_restart:
sequence:
- service: browser_mod.toast
data:
duration: 16000
message: 'Startar om Home Assistant...'
- service: homeassistant.restart
homekit_restart:
sequence:
- service: browser_mod.toast
data:
duration: 8000
message: 'Startar Homekit'
- service: homekit.start
tv_mute_toggle:
sequence:
- service: media_player.volume_mute
data_template:
entity_id: media_player.sony_bravia_tv
is_volume_muted: >-
{% if state_attr('media_player.sony_bravia_tv', 'is_volume_muted') == false %}
true
{% else %}
false
{% endif %}
monitorer_mute_toggle:
sequence:
- service: homeassistant.update_entity
entity_id: sensor.monitorer_mute_check
- service_template: >
{% if states('sensor.monitorer_mute_check') == 'false' %}
shell_command.monitorer_mute_on
{% else %}
shell_command.monitorer_mute_off
{% endif %}
- service: homeassistant.update_entity
entity_id: sensor.monitorer_mute_check
imac_start_time_machine_backup:
sequence:
- service: browser_mod.toast
data:
duration: 8000
message: 'Säkerhetskopierar till Time Machine...'
- service: shell_command.imac_start_time_machine_backup