diff --git a/homeassistant/components/light/yeelightsunflower.py b/homeassistant/components/light/yeelightsunflower.py index ead00d97f64..6d132f8a1fc 100644 --- a/homeassistant/components/light/yeelightsunflower.py +++ b/homeassistant/components/light/yeelightsunflower.py @@ -2,9 +2,7 @@ Support for Yeelight Sunflower color bulbs (not Yeelight Blue or WiFi). For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/light.yeelight-sunflower -Uses the yeelightsunflower library: -https://github.com/lindsaymarkward/python-yeelight-sunflower +https://home-assistant.io/components/light.yeelightsunflower """ import logging import voluptuous as vol @@ -18,33 +16,28 @@ from homeassistant.const import CONF_HOST import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['yeelightsunflower==0.0.6'] -SUPPORT_YEELIGHT_SUNFLOWER = (SUPPORT_BRIGHTNESS | SUPPORT_RGB_COLOR) _LOGGER = logging.getLogger(__name__) -# Validate the user's configuration + +SUPPORT_YEELIGHT_SUNFLOWER = (SUPPORT_BRIGHTNESS | SUPPORT_RGB_COLOR) + PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONF_HOST): cv.string }) def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the Yeelight Sunflower Light platform.""" + """Set up the Yeelight Sunflower Light platform.""" import yeelightsunflower - # Assign configuration variables. - # The configuration check takes care they are present. host = config.get(CONF_HOST) - - # Setup connection with Yeelight Sunflower hub hub = yeelightsunflower.Hub(host) - # Verify that hub is responsive if not hub.available: _LOGGER.error('Could not connect to Yeelight Sunflower hub') return False - # Add devices add_devices(SunflowerBulb(light) for light in hub.get_lights()) diff --git a/homeassistant/components/sensor/fedex.py b/homeassistant/components/sensor/fedex.py index a0b5bbf5a0a..9cbeb753b2b 100644 --- a/homeassistant/components/sensor/fedex.py +++ b/homeassistant/components/sensor/fedex.py @@ -2,7 +2,7 @@ Sensor for Fedex packages. For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/sensor.usps/ +https://home-assistant.io/components/sensor.fedex/ """ from collections import defaultdict import logging diff --git a/homeassistant/components/sensor/ups.py b/homeassistant/components/sensor/ups.py index 0e358a6abbb..4d4e0601ca5 100644 --- a/homeassistant/components/sensor/ups.py +++ b/homeassistant/components/sensor/ups.py @@ -2,7 +2,7 @@ Sensor for UPS packages. For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/sensor.usps/ +https://home-assistant.io/components/sensor.ups/ """ from collections import defaultdict import logging