-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.yaml
162 lines (147 loc) · 7.12 KB
/
configuration.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
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#logger:
# default: debug
# Example configuration.yaml entry
switch:
- platform: command_line
switches:
frozenbottle_patterns:
command_on: "ssh frozen-bottle systemctl start frozen-bottle-loop-all.service"
command_off: "ssh frozen-bottle systemctl stop frozen-bottle-loop-all.service"
- platform: wake_on_lan
mac: "d0:27:88:b2:48:38"
name: "Jukebox"
- platform: template
switches:
jukebox_mute:
turn_on:
service: shell_command.jukebox_mute
turn_off:
service: shell_command.jukebox_unmute
jukebox_visualizer:
turn_on:
service: shell_command.frozen_bottle_jukebox_visualizer_start
turn_off:
service: shell_command.frozen_bottle_jukebox_visualizer_stop
rest_command:
labor_open:
url: "https://freieslabor.org/api/room/"
method: post
content_type: "application/x-www-form-urlencoded"
payload: "open=true"
username: "info-display"
password: !secret labor_api
verify_ssl: False
labor_close:
url: "https://freieslabor.org/api/room/"
method: post
content_type: "application/x-www-form-urlencoded"
payload: "open=false"
username: "info-display"
password: !secret labor_api
verify_ssl: False
shell_command:
jukebox_spotify_next: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
jukebox_spotify_playpause: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
jukebox_browser_playpause: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox playerctl-browser play-pause"
frozen_bottle_jukebox_visualizer_start: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox systemctl --user start frozen-bottle-visualizer.service"
frozen_bottle_jukebox_visualizer_stop: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox systemctl --user stop frozen-bottle-visualizer.service"
jukebox_mute: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox amixer set Master mute"
jukebox_unmute: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox amixer set Master unmute"
jukebox_vol_plus: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox amixer sset Master '5%+'"
jukebox_vol_minus: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox amixer sset Master '5%-'"
jukebox_suspend: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox \"sudo ethtool -s enp2s0 wol g && sudo systemctl suspend\""
jukebox_spotify: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox screen -dm \"bash -c '! pidof spotify && DISPLAY=:0 spotify'\""
ampel_off: "ssh homeassistant@localhost \"systemctl --user stop ampel-random.service; wget -q -O /dev/null --post-data= http://ampel/stop\""
ampel_random: "ssh homeassistant@localhost systemctl --user start ampel-random.service"
ampel_normal: "ssh homeassistant@localhost \"systemctl --user stop ampel-random.service; wget -q -O /dev/null --post-data= http://ampel/normal\""
ampel_all_on: "ssh homeassistant@localhost \"systemctl --user stop ampel-random.service; wget -q -O /dev/null --post-data='red=1&yellow=1&green=1' http://ampel/custom\""
studio_scheinwerfer_set: "/home/homeassistant/bin/ignition-dmx-hass bluedmx.lan {{ states('input_number.ignition_hue') | int }} {{ states('input_number.ignition_saturation') | int }} {{ states('input_number.ignition_brightness') | int}} {{ states('input_select.ignition_effect') }}"
sensor:
- platform: command_line
command: "ssh {{ (states('sensor.jukebox_active_user') | from_json()).user }}@jukebox playerctl-get-playing"
name: jukebox_now_playing
scan_interval: 30
# Example configuration.yaml entry
rest:
- authentication: basic
username: "info-display"
password: !secret labor_api
scan_interval: 100
resource: "https://freieslabor.org/api/room/"
verify_ssl: false
sensor:
- name: "Raumstatus"
json_attributes:
- "open"
- "since"
telegram_bot:
- platform: broadcast
api_key: !secret telegram_token
allowed_chat_ids:
- -1001326646611 # Freies Labor Channel
# note: effect_list_template needs similar definition in settings -> devices & services -> helpers -> ignition_effect
light:
- platform: template
lights:
ignition_spot:
friendly_name: "LED-Scheinwerfer"
unique_id: "ignition-spot-1"
value_template: "{{ states('input_number.ignition_brightness') | int > 0 }}"
level_template: "{{ states('input_number.ignition_brightness') | int }}"
color_template: "({{ states('input_number.ignition_hue') | int }}, {{ states('input_number.ignition_saturation') | int }})"
effect_list_template: "{{ ['normal', 'dim-up', 'dim-down', 'dim-up-down', 'color-transition', '3-random-colors', '7-random-colors', 'music-control', 'strobe'] }}"
effect_template: "{{ states('input_select.ignition_effect') }}"
turn_on:
- service: input_number.set_value
data:
value: 148
entity_id: input_number.ignition_brightness
- service: input_number.set_value
data:
value: 15
entity_id: input_number.ignition_hue
- service: input_number.set_value
data:
value: 57
entity_id: input_number.ignition_saturation
- service: input_select.select_option
data:
option: normal
entity_id: input_select.ignition_effect
- service: shell_command.studio_scheinwerfer_set
turn_off:
- service: input_number.set_value
data:
value: 0
entity_id: input_number.ignition_brightness
- service: shell_command.studio_scheinwerfer_set
set_level:
- service: input_number.set_value
data:
value: "{{ brightness }}"
entity_id: input_number.ignition_brightness
- service: shell_command.studio_scheinwerfer_set
set_color:
- service: input_number.set_value
data:
value: "{{ h }}"
entity_id: input_number.ignition_hue
- service: input_number.set_value
data:
value: "{{ s }}"
entity_id: input_number.ignition_saturation
- service: shell_command.studio_scheinwerfer_set
set_effect:
- service: input_select.select_option
data:
option: "{{ effect }}"
entity_id: input_select.ignition_effect
- service: shell_command.studio_scheinwerfer_set