mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Updates to resolve flake8 errors
This commit is contained in:
parent
a7315684c4
commit
a287bb5da0
@ -9,9 +9,9 @@ from datetime import timedelta
|
|||||||
from homeassistant.loader import get_component
|
from homeassistant.loader import get_component
|
||||||
import homeassistant.util as util
|
import homeassistant.util as util
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_OPEN, STATE_CLOSED, ATTR_ENTITY_ID)
|
STATE_OPEN)
|
||||||
from homeassistant.helpers import (
|
from homeassistant.helpers import (
|
||||||
extract_entity_ids, platform_devices_from_config)
|
platform_devices_from_config)
|
||||||
from homeassistant.components import group, discovery, wink
|
from homeassistant.components import group, discovery, wink
|
||||||
|
|
||||||
DOMAIN = 'sensor'
|
DOMAIN = 'sensor'
|
||||||
@ -39,6 +39,7 @@ def is_on(hass, entity_id=None):
|
|||||||
|
|
||||||
return hass.states.is_state(entity_id, STATE_OPEN)
|
return hass.states.is_state(entity_id, STATE_OPEN)
|
||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
""" Track states and offer events for sensors. """
|
""" Track states and offer events for sensors. """
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -21,6 +21,7 @@ DISCOVER_LIGHTS = "wink.lights"
|
|||||||
DISCOVER_SWITCHES = "wink.switches"
|
DISCOVER_SWITCHES = "wink.switches"
|
||||||
DISCOVER_SENSORS = "wink.sensors"
|
DISCOVER_SENSORS = "wink.sensors"
|
||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
""" Sets up the Wink component. """
|
""" Sets up the Wink component. """
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -51,6 +52,7 @@ def setup(hass, config):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class WinkSensorDevice(Device):
|
class WinkSensorDevice(Device):
|
||||||
""" represents a wink sensor within home assistant. """
|
""" represents a wink sensor within home assistant. """
|
||||||
|
|
||||||
@ -88,6 +90,7 @@ class WinkSensorDevice(Device):
|
|||||||
""" True if door is open. """
|
""" True if door is open. """
|
||||||
return self.wink.state()
|
return self.wink.state()
|
||||||
|
|
||||||
|
|
||||||
class WinkToggleDevice(ToggleDevice):
|
class WinkToggleDevice(ToggleDevice):
|
||||||
""" represents a WeMo switch within home assistant. """
|
""" represents a WeMo switch within home assistant. """
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user