mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
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
This commit is contained in:
parent
99f1ea9b59
commit
080c4efb00
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user