2018-04-08 19:48:42 +00:00
|
|
|
#-------------------------------------------
|
|
|
|
# @CCOSTAN
|
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
2019-03-31 20:41:26 +00:00
|
|
|
# More Info : https://www.vcloudinfo.com/2019/03/using-foscam-cameras-with-home-assistant-and-synology.html
|
2018-04-08 19:48:42 +00:00
|
|
|
#-------------------------------------------
|
2019-03-20 21:04:15 +00:00
|
|
|
|
2018-04-08 19:48:42 +00:00
|
|
|
binary_sensor:
|
|
|
|
- platform: rest
|
|
|
|
name: "CAMERA1 Motion Sensor"
|
|
|
|
resource: !secret camera1_url
|
|
|
|
device_class: motion
|
|
|
|
scan_interval: 5
|
|
|
|
value_template: >-
|
|
|
|
{%- if "<motionDetectAlarm>2</motionDetectAlarm>" in value -%}
|
|
|
|
{{ true }}
|
|
|
|
{%- else -%}
|
|
|
|
{{ false }}
|
|
|
|
{%- endif -%}
|
|
|
|
- platform: rest
|
|
|
|
name: "CAMERA2 Motion Sensor"
|
|
|
|
resource: !secret camera2_url
|
|
|
|
device_class: motion
|
|
|
|
scan_interval: 5
|
|
|
|
value_template: >-
|
|
|
|
{%- if "<motionDetectAlarm>2</motionDetectAlarm>" in value -%}
|
|
|
|
{{ true }}
|
|
|
|
{%- else -%}
|
|
|
|
{{ false }}
|
|
|
|
{%- endif -%}
|
|
|
|
- platform: rest
|
|
|
|
name: "CAMERA3 Motion Sensor"
|
|
|
|
resource: !secret camera3_url
|
|
|
|
device_class: motion
|
|
|
|
scan_interval: 5
|
|
|
|
value_template: >-
|
|
|
|
{%- if "<motionDetectAlarm>2</motionDetectAlarm>" in value -%}
|
|
|
|
{{ true }}
|
|
|
|
{%- else -%}
|
|
|
|
{{ false }}
|
|
|
|
{%- endif -%}
|
|
|
|
#-------------------------------------------
|
|
|
|
# Motion Sensors added to other motion sensors in group yaml
|
2019-03-20 21:04:15 +00:00
|
|
|
#-------------------------------------------
|