Allow generating requirements_all.txt

This commit is contained in:
Paulus Schoutsen 2015-11-17 00:18:42 -08:00
parent 8be53af78f
commit 377d2c6e5a
17 changed files with 283 additions and 206 deletions

View file

@ -8,9 +8,7 @@ https://home-assistant.io/components/light.blinksticklight/
"""
import logging
from blinkstick import blinkstick
from homeassistant.components.light import (Light, ATTR_RGB_COLOR)
from homeassistant.components.light import Light, ATTR_RGB_COLOR
_LOGGER = logging.getLogger(__name__)
@ -22,6 +20,8 @@ DEPENDENCIES = []
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
""" Add device specified by serial number. """
from blinkstick import blinkstick
stick = blinkstick.find_by_serial(config['serial'])
add_devices_callback([BlinkStickLight(stick, config['name'])])