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