mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +00:00
Fix sample
This commit is contained in:
parent
cfb48d7271
commit
30abcda712
@ -91,10 +91,9 @@ switch:
|
||||
### {% linkable_title Control Foscam Motion Sensor %}
|
||||
|
||||
This switch will control the motion sensor of Foscam Webcams which Support CGI Commands ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). This switch supports statecmd, which checks the current state of motion detection.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
# Replace admin and password with an "Admin" priviledged Foscam user
|
||||
# Replace ipaddress with the local IP address of your Foscam
|
||||
switch:
|
||||
platform: command_line
|
||||
switches:
|
||||
@ -102,5 +101,8 @@ switch:
|
||||
oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'
|
||||
offcmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'
|
||||
statecmd: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"'
|
||||
value_template: '{{ value == "1" }}'
|
||||
value_template: {% raw %}'{{ value == "1" }}'{% endraw %}
|
||||
```
|
||||
|
||||
- Replace admin and password with an "Admin" priviledged Foscam user
|
||||
- Replace ipaddress with the local IP address of your Foscam
|
||||
|
Loading…
x
Reference in New Issue
Block a user