Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Aug 9, 2017
1 parent b52cd96 commit 899bcf4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lyric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def users(self):

@property
def devices(self):
# if 'deviceID' in self._devices[0]:
devices = []
for device in self._devices:
if device['deviceType'] == 'Thermostat':
Expand All @@ -259,21 +258,19 @@ def devices(self):

@property
def thermostats(self):
# if 'deviceID' in self._devices[0]:
thermostats = []
for device in self._devices:
if device['deviceType'] == 'Thermostat':
devices.append(Thermostat(device['deviceID'], self._locationId,
thermostats.append(Thermostat(device['deviceID'], self._locationId,
self._lyric_api, self._local_time))
return thermostats

@property
def waterLeakDetectors(self):
# if 'deviceID' in self._devices[0]:
waterLeakDetectors = []
for device in self._devices:
if device['deviceType'] == 'Water Leak Detector':
devices.append(WaterLeakDetector(device['deviceID'], self._locationId,
waterLeakDetectors.append(WaterLeakDetector(device['deviceID'], self._locationId,
self._lyric_api, self._local_time))
return waterLeakDetectors

Expand Down Expand Up @@ -1062,4 +1059,4 @@ def _devices_type(self, deviceType, locationId):
@property
def locations(self):
return [Location(location['locationID'], self, self._local_time)
for location in self._locations]
for location in self._locations]

0 comments on commit 899bcf4

Please sign in to comment.