From 8c0592a63ed0eca7c88e222247552a1f8389693e Mon Sep 17 00:00:00 2001
From: ccostan <carlo@ipm.com>
Date: Thu, 23 Aug 2018 18:16:15 -0400
Subject: [PATCH] #410 Set office light to work when either stacey or I is out
 of bed.

---
 config/packages/office_motion.yaml | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/config/packages/office_motion.yaml b/config/packages/office_motion.yaml
index 25f3b284..58e2076d 100755
--- a/config/packages/office_motion.yaml
+++ b/config/packages/office_motion.yaml
@@ -35,15 +35,20 @@ automation:
         from: 'off'
 
     condition:
-      - condition: state
-        entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
-        state: 'off'
       - condition: state
         entity_id: group.family
         state: 'home'
       - condition: state
         entity_id: light.office_lamp
         state: 'off'
+      - condition: or
+        conditions:
+          - condition: state
+            entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
+            state: 'off'
+          - condition: state
+            entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
+            state: 'off'
       - condition: or
         conditions:
           - condition: time