From e19fed8c2d1bca91a388778dfae4c077290b2d2c Mon Sep 17 00:00:00 2001 From: joemcmonagle Date: Fri, 11 Mar 2016 19:37:15 -0500 Subject: [PATCH] Update foscam_away_mode_PTZ.markdown --- .../_cookbook/foscam_away_mode_PTZ.markdown | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/_cookbook/foscam_away_mode_PTZ.markdown b/source/_cookbook/foscam_away_mode_PTZ.markdown index 1f5df77af36..08f504e9d7f 100644 --- a/source/_cookbook/foscam_away_mode_PTZ.markdown +++ b/source/_cookbook/foscam_away_mode_PTZ.markdown @@ -57,4 +57,21 @@ script: entity_id: switch.foscam_motion ``` -I'm working on the `automation` component to be used to set when `home` and `not_home` +To automate Foscam being set to "on" (facing the correct way with motion sensor on), I used the following simple automation: + +```yaml +automation: + - alias: Set Foscam to Away Mode when I leave home + trigger: + platform: state + entity_id: group.family + from: 'home' + action: + service: script.foscam_on + - alias: Set Foscam to Home Mode when I arrive Home + trigger: + platform: state + entity_id: group.family + to: 'home' + action: + service: script.foscam_off