forked from mcaminiti/homeassistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitch.yaml
62 lines (46 loc) · 2.58 KB
/
switch.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
#################################################################
## Switches
#################################################################
#################################################################
## Template Switches
#################################################################
##########################################################
## MagicMirror Display Switch
##########################################################
- platform: command_line
switches:
magicmirror_display:
command_on: "curl -X GET 'http://REDACTED.62:8080/api/monitor/on'"
command_off: "curl -X GET 'http://REDACTED.62:8080/api/monitor/off'"
command_state: "curl -X GET http://REDACTED.62:8080/api/monitor/"
value_template: "{{ value_json.monitor == 'on' }}"
##########################################################
## MagicMirror Weekend Chore Switch
##########################################################
- platform: command_line
switches:
magicmirror_weekend_chores_display:
command_on: "curl -X GET 'http://REDACTED.62:8080/api/module/module_5_MMM-HomeAssistantDisplay/show'"
command_off: "curl -X GET 'http://REDACTED.62:8080/api/module/module_5_MMM-HomeAssistantDisplay/hide'"
command_state: "curl -X GET http://REDACTED.62:8080/api/module/module_5_MMM-HomeAssistantDisplay/"
value_template: "{{ value_json.data[0].hidden == false }}"
##########################################################
## Pihole #1 Disable Switch
##########################################################
# - platform: command_line
# switches:
# pihole_1_switch:
# command_on: "curl -X GET 'http://REDACTED.4/REDACTED/api.php?enable&auth=REDACTED'"
# command_off: "curl -X GET 'http://REDACTED.4/REDACTED/api.php?disable=900&auth=REDACTED'"
# command_state: "curl -X GET 'http://REDACTED.4/REDACTED/api.php?status'"
# value_template: "{{ value_json.status == 'enabled' }}"
##########################################################
## Pihole #2 Disable Switch
##########################################################
# - platform: command_line
# switches:
# pihole_2_switch:
# command_on: "curl -X GET 'http://REDACTED.5/REDACTED/api.php?enable&auth=REDACTED'"
# command_off: "curl -X GET 'http://REDACTED.5/REDACTED/api.php?disable=900&auth=REDACTED'"
# command_state: "curl -X GET 'http://REDACTED.5/REDACTED/api.php?status'"
# value_template: "{{ value_json.status == 'enabled' }}"