-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathswitches.yaml
44 lines (42 loc) · 2.88 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
#Switches
- platform: command_line
switches:
amcrestlrmotion:
command_on: 'curl -k -u admin:REDACTED "http://192.168.1.7/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=true"'
command_off: 'curl -k -u admin:REDACTED "http://192.168.1.7/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=false"'
command_state: 'curl -k --silent -u admin:REDACTED "http://192.168.1.7/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect\[0\].Enable" | sed "s/^.*\(.\{5\}\)$/\1/"'
value_template: '{{ value == "true" }}'
friendly_name: Living Room Motion Detection
amcrestgaragemotion:
command_on: 'curl -k -u admin:REDACTED "http://192.168.1.8/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=true"'
command_off: 'curl -k -u admin:REDACTED "http://192.168.1.8/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=false"'
command_state: 'curl -k --silent -u admin:REDACTED "http://192.168.1.8/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect\[0\].Enable" | sed "s/^.*\(.\{5\}\)$/\1/"'
value_template: '{{ value == "true" }}'
friendly_name: Garage Motion Dection
amcrestbackyardmotion:
command_on: 'curl -k -u admin:REDACTED "http://192.168.1.9/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=true"'
command_off: 'curl -k -u admin:REDACTED "http://192.168.1.9/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=false"'
command_state: 'curl -k --silent -u admin:REDACTED "http://192.168.1.9/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect\[0\].Enable" | sed "s/^.*\(.\{5\}\)$/\1/"'
value_template: '{{ value == "true" }}'
friendly_name: Back Yard Motion Detection
amcrestfrontyardmotion:
command_on: 'curl -k -u admin:REDACTED "http://192.168.1.10/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=true"'
command_off: 'curl -k -u admin:REDACTED "http://192.168.1.10/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=false"'
command_state: 'curl -k --silent -u admin:REDACTED "http://192.168.1.10/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect\[0\].Enable" | sed "s/^.*\(.\{5\}\)$/\1/"'
value_template: '{{ value == "true" }}'
friendly_name: Front Yard Motion Detection
- platform: template
switches:
noise_machine:
value_template: '{% if is_state("switch.bedroom_receptacle_switch", "on") %} on {% elif is_state("switch.bedroom_receptacle_switch", "off") %} off {% else %} failed {% endif %}'
friendly_name: "Noise Machine"
turn_on:
service: switch.turn_on
entity_id: switch.bedroom_receptacle_switch
turn_off:
service: switch.turn_off
entity_id: switch.bedroom_receptacle_switch
- platform: xiaomi_vacuum
name: 'Vacuum'
host: 192.168.1.22
token: !secret vacuum_token