Fixed flake8 violations
parent
3d57c80656
commit
e6aabb9706
|
@ -30,6 +30,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||
|
||||
|
||||
class TemperSensor(Entity):
|
||||
""" Represents an Temper temperature sensor within Home Assistant. """
|
||||
def __init__(self, temper_device, temp_unit, name):
|
||||
self.temper_device = temper_device
|
||||
self.temp_unit = temp_unit
|
||||
|
@ -55,6 +56,6 @@ class TemperSensor(Entity):
|
|||
""" Retrieve latest state. """
|
||||
try:
|
||||
self.current_value = self.temper_device.get_temperature()
|
||||
except Exception:
|
||||
except IOError:
|
||||
_LOGGER.error('Failed to get temperature due to insufficient '
|
||||
'permissions. Try running with "sudo"')
|
||||
|
|
|
@ -91,3 +91,6 @@ pywemo>=0.1
|
|||
|
||||
# Wink (*.wink)
|
||||
https://github.com/balloob/python-wink/archive/master.zip#pywink>=0.1
|
||||
|
||||
# Temper sensors
|
||||
https://github.com/rkabadi/temper-python/archive/master.zip
|
Loading…
Reference in New Issue