Fix pylint 1.7.2 no-else-return issues (#8361)

* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2017-07-05 23:30:01 -07:00
1 parent 5779d64e98
commit 46e030662d
111 files changed
+305 -455

No files matched your search

+5 -5
View File
@@ -139,17 +139,17 @@ class BOMCurrentSensor(Entity):
"""Return the name of the sensor."""
if self.stationname is None:
return 'BOM {}'.format(SENSOR_TYPES[self._condition][0])
else:
return 'BOM {} {}'.format(
self.stationname, SENSOR_TYPES[self._condition][0])
return 'BOM {} {}'.format(
self.stationname, SENSOR_TYPES[self._condition][0])
@property
def state(self):
"""Return the state of the sensor."""
if self.rest.data and self._condition in self.rest.data:
return self.rest.data[self._condition]
else:
return STATE_UNKNOWN
return STATE_UNKNOWN
@property
def device_state_attributes(self):