From 080c4efb000ebc0ea52f314ac4c17b3989858bc9 Mon Sep 17 00:00:00 2001 From: devdelay Date: Sun, 11 Dec 2016 17:46:10 -0500 Subject: [PATCH] Ecobee detect Smart Away (#4769) * Ecobee autoAway Event * Update ecobee.py Checking if event['running'] true is pointless because if false event['type'] will equal template and when true type will only be 'hold' or 'autoAway' so I've removed this check from the statement --- homeassistant/components/climate/ecobee.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/climate/ecobee.py b/homeassistant/components/climate/ecobee.py index c98ac6d0106..84d8c32f9ff 100644 --- a/homeassistant/components/climate/ecobee.py +++ b/homeassistant/components/climate/ecobee.py @@ -195,8 +195,9 @@ class Thermostat(ClimateDevice): mode = self.mode events = self.thermostat['events'] for event in events: - if event['running']: - mode = event['holdClimateRef'] + if event['holdClimateRef'] == 'away' or \ + event['type'] == 'autoAway': + mode = "away" break return 'away' in mode