Example #1
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Wink cover platform."""
    import pywink

    add_devices(WinkCoverDevice(shade, hass) for shade in pywink.get_shades())
    add_devices(
        WinkCoverDevice(door, hass) for door in pywink.get_garage_doors())
Example #2
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Wink cover platform."""
    import pywink

    add_devices(WinkCoverDevice(shade) for shade in
                pywink.get_shades())
    add_devices(WinkCoverDevice(door) for door in
                pywink.get_garage_doors())
Example #3
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Set up the Wink cover platform."""
    import pywink

    for shade in pywink.get_shades():
        _id = shade.object_id() + shade.name()
        if _id not in hass.data[DOMAIN]['unique_ids']:
            add_devices([WinkCoverDevice(shade, hass)])
    for door in pywink.get_garage_doors():
        _id = door.object_id() + door.name()
        if _id not in hass.data[DOMAIN]['unique_ids']:
            add_devices([WinkCoverDevice(door, hass)])
Example #4
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Set up the Wink cover platform."""
    import pywink

    for shade in pywink.get_shades():
        _id = shade.object_id() + shade.name()
        if _id not in hass.data[DOMAIN]['unique_ids']:
            add_devices([WinkCoverDevice(shade, hass)])
    for door in pywink.get_garage_doors():
        _id = door.object_id() + door.name()
        if _id not in hass.data[DOMAIN]['unique_ids']:
            add_devices([WinkCoverDevice(door, hass)])
Example #5
0
def setup_platform(opp, config, add_entities, discovery_info=None):
    """Set up the Wink cover platform."""

    for shade in pywink.get_shades():
        _id = shade.object_id() + shade.name()
        if _id not in opp.data[DOMAIN]["unique_ids"]:
            add_entities([WinkCoverEntity(shade, opp)])
    for shade in pywink.get_shade_groups():
        _id = shade.object_id() + shade.name()
        if _id not in opp.data[DOMAIN]["unique_ids"]:
            add_entities([WinkCoverEntity(shade, opp)])
    for door in pywink.get_garage_doors():
        _id = door.object_id() + door.name()
        if _id not in opp.data[DOMAIN]["unique_ids"]:
            add_entities([WinkCoverEntity(door, opp)])
Example #6
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Wink cover platform."""
    import pywink

    if discovery_info is None:
        token = config.get(CONF_ACCESS_TOKEN)

        if token is None:
            logging.getLogger(__name__).error(
                "Missing wink access_token. "
                "Get one at https://winkbearertoken.appspot.com/")
            return

        pywink.set_bearer_token(token)

    add_devices(WinkCoverDevice(shade) for shade, door in
                pywink.get_shades())
Example #7
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Wink rollershutter platform."""
    import pywink

    add_devices(
        WinkRollershutterDevice(shade) for shade in pywink.get_shades())
Example #8
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Wink rollershutter platform."""
    import pywink

    add_devices(WinkRollershutterDevice(shade) for shade in
                pywink.get_shades())