-
Notifications
You must be signed in to change notification settings - Fork 437
/
switches.yaml
169 lines (167 loc) · 9.13 KB
/
switches.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
169
#################################################################
## Switches
#################################################################
- platform: hikvisioncam
host: 192.168.2.91
name: PorchMotion
username: !secret hikvision_username
password: !secret hikvision_password
- platform: hikvisioncam
host: 192.168.2.92
name: BackyardMotion
username: !secret hikvision_username
password: !secret hikvision_password
- platform: hikvisioncam
host: 192.168.2.93
name: PatioMotion
username: !secret hikvision_username
password: !secret hikvision_password
- platform: hikvisioncam
host: 192.168.2.94
name: DrivewayMotion
username: !secret hikvision_username
password: !secret hikvision_password
- platform: mqtt
name: "Shelly Garage"
state_topic: "shellies/shelly1-8CAAB5C511D0/relay/0"
command_topic: "shellies/shelly1-8CAAB5C511D0/relay/0/command"
qos: 1
payload_on: "on"
payload_off: "off"
retain: false
optimistic: false
- platform: template
switches:
downstairs_away:
friendly_name: Downstairs Away
value_template: "{{(states.climate.downstairs.attributes|default({})).preset_mode|default('Home') == 'Away'}}"
turn_on:
- service: climate.set_preset_mode
data:
entity_id: climate.downstairs
preset_mode: 'Away'
turn_off:
- service: ecobee.resume_program
data:
entity_id: climate.downstairs
upstairs_away:
friendly_name: Upstairs Away
value_template: "{{(states.climate.upstairs.attributes|default({})).preset_mode|default('Home') == 'Away'}}"
turn_on:
- service: climate.set_preset_mode
data:
entity_id: climate.upstairs
preset_mode: 'Away'
turn_off:
- service: ecobee.resume_program
data:
entity_id: climate.upstairs
bedroom_away:
friendly_name: Master Away
value_template: "{{(states.climate.bedroom.attributes|default({})).preset_mode|default('Home') == 'Away'}}"
turn_on:
- service: climate.set_preset_mode
data:
entity_id: climate.bedroom
preset_mode: 'Away'
turn_off:
- service: ecobee.resume_program
data:
entity_id: climate.bedroom
security_armed:
friendly_name: Home Security Arm
value_template: "{{states('alarm_control_panel.abode_alarm') != 'disarmed'}}"
turn_on:
- service: homeassistant.turn_on
entity_id: script.abodeaway
turn_off:
- service: homeassistant.turn_on
entity_id: script.abodestandby
sonos_night_sound:
friendly_name: Sonos Night Sound
value_template: "{{state_attr('media_player.family_room_2','night_sound')}}"
turn_on:
- service: switch.turn_on
entity_id:
- switch.sonos_family_room_night_sound
turn_off:
- service: switch.turn_off
entity_id:
- switch.sonos_family_room_night_sound
sonos_speech_enhance:
friendly_name: Sonos Speech Enhance
value_template: "{{state_attr('media_player.family_room_2','speech_enhance')}}"
turn_on:
- service: switch.turn_on
entity_id:
- switch.sonos_family_room_speech_enhancement
turn_off:
- service: switch.turn_off
entity_id:
- switch.sonos_family_room_speech_enhancement
master_night_sound:
friendly_name: Master Night Sound
value_template: "{{state_attr('media_player.master','night_sound')}}"
turn_on:
- service: switch.turn_on
entity_id:
- switch.sonos_master_night_sound
turn_off:
- service: switch.turn_off
entity_id:
- switch.sonos_family_room_night_sound
master:
friendly_name: Master Speech Enhance
value_template: "{{state_attr('media_player.master','speech_enhance')}}"
turn_on:
- service: switch.turn_on
entity_id:
- switch.sonos_master_speech_enhancement
turn_off:
- service: switch.turn_off
entity_id:
- switch.sonos_master_speech_enhancement
# example of PiHole commands (PWHASH is the value of WEBPASSWORD in /etc/pihole/setupVars.conf)
# pihole_status: "curl -X GET 'http://ip.ad.dr.ess/admin/api.php?status&auth=PWHASH'"
# pihole_enable: /usr/bin/curl -k 'http://ip.ad.dr.ess/admin/api.php?enable=300&auth=PWHASH'
# pihole_disable: /usr/bin/curl -k 'http://ip.ad.dr.ess/admin/api.php?disable=300&auth=PWHASH'
# - platform: command_line
# switches:
# pihole:
# command_on: !secret pihole_enable
# command_off: !secret pihole_disable
# command_state: !secret pihole_status
# value_template: "{{ value_json.status == 'enabled' }}"
# friendly_name: PiHole
# - platform: command_line
# switches:
# utubeon:
# command_on: curl -X POST http://192.168.2.252:8001/api/v2/applications/111299001912
# command_off: curl -X DELETE http://192.168.2.252:8001/api/v2/applications/111299001912
# friendly_name: "Turn on Youtube"
# command_state: off
# netflixon:
# command_on: curl -X POST http://192.168.2.252:8001/ws/apps/Netflix
# command_off: curl -X POST http://192.168.2.252:8001/api/v2/applications/RN1MCdNq8t
# command_state: curl -X GET http://192.168.2.252:8001/ws/apps/Netflix
# friendly_name: "Turn on Netflix"
# plexon:
# command_on: curl -X POST http://192.168.2.252:8001/api/v2/applications/kIciSQlYEM.plex
# command_off: curl -X POST http://192.168.2.252:8001
# command_state: off
# friendly_name: "Turn on Plex"
# platform: command_line
# switches:
# #Switch for Foscam Motion Detection
# foscam_record:
# command_on: 'curl -k "http://192.168.2.173:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=1&isPirAlarmEnable=1&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# command_off: 'curl -k "http://192.168.2.173:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=0&isPirAlarmEnable=0&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# value_template: ''
# foscam_record2:
# command_on: 'curl -k "http://192.168.2.224:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=1&isPirAlarmEnable=1&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# command_off: 'curl -k "http://192.168.2.224:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=0&isPirAlarmEnable=0&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# value_template: ''
# foscam_record3:
# command_on: 'curl -k "http://192.168.2.50:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=1&isPirAlarmEnable=1&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# command_off: 'curl -k "http://192.168.2.50:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&linkage=8&snapInterval=5&sensitivity=2&triggerInterval=10&isMovAlarmEnable=0&isPirAlarmEnable=0&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023=&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=arsaboo&pwd=alok18"'
# value_template: ''