mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fixed style violations
This commit is contained in:
parent
3ce6463af3
commit
8eb73c8f17
@ -13,6 +13,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN, STATE_OPEN, STATE_CLOSED
|
|||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.3.1']
|
REQUIREMENTS = ['python-wink==0.3.1']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Sets up the Wink platform. """
|
""" Sets up the Wink platform. """
|
||||||
import pywink
|
import pywink
|
||||||
@ -62,6 +63,7 @@ class WinkSensorDevice(Entity):
|
|||||||
""" True if door is open. """
|
""" True if door is open. """
|
||||||
return self.wink.state()
|
return self.wink.state()
|
||||||
|
|
||||||
|
|
||||||
class WinkEggMinder(Entity):
|
class WinkEggMinder(Entity):
|
||||||
""" Represents a Wink Egg Minder. """
|
""" Represents a Wink Egg Minder. """
|
||||||
|
|
||||||
@ -84,5 +86,5 @@ class WinkEggMinder(Entity):
|
|||||||
return self.wink.name()
|
return self.wink.name()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
""" Update state of the Egg Minder. """
|
""" Update state of the Egg Minder. """
|
||||||
self.wink.update_state()
|
self.wink.update_state()
|
||||||
|
@ -38,7 +38,8 @@ def setup(hass, config):
|
|||||||
for component_name, func_exists, discovery_type in (
|
for component_name, func_exists, discovery_type in (
|
||||||
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
||||||
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
||||||
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays, DISCOVER_SENSORS),
|
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays,
|
||||||
|
DISCOVER_SENSORS),
|
||||||
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
||||||
|
|
||||||
if func_exists():
|
if func_exists():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user