mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Fix link (#6219)
This commit is contained in:
parent
c5a8372f13
commit
a80fd2f243
@ -2,9 +2,7 @@
|
|||||||
Support for Yeelight Sunflower color bulbs (not Yeelight Blue or WiFi).
|
Support for Yeelight Sunflower color bulbs (not Yeelight Blue or WiFi).
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/light.yeelight-sunflower
|
https://home-assistant.io/components/light.yeelightsunflower
|
||||||
Uses the yeelightsunflower library:
|
|
||||||
https://github.com/lindsaymarkward/python-yeelight-sunflower
|
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -18,11 +16,12 @@ from homeassistant.const import CONF_HOST
|
|||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['yeelightsunflower==0.0.6']
|
REQUIREMENTS = ['yeelightsunflower==0.0.6']
|
||||||
SUPPORT_YEELIGHT_SUNFLOWER = (SUPPORT_BRIGHTNESS | SUPPORT_RGB_COLOR)
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Validate the user's configuration
|
|
||||||
|
SUPPORT_YEELIGHT_SUNFLOWER = (SUPPORT_BRIGHTNESS | SUPPORT_RGB_COLOR)
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Required(CONF_HOST): cv.string
|
vol.Required(CONF_HOST): cv.string
|
||||||
})
|
})
|
||||||
@ -32,19 +31,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
"""Set up the Yeelight Sunflower Light platform."""
|
"""Set up the Yeelight Sunflower Light platform."""
|
||||||
import yeelightsunflower
|
import yeelightsunflower
|
||||||
|
|
||||||
# Assign configuration variables.
|
|
||||||
# The configuration check takes care they are present.
|
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
|
|
||||||
# Setup connection with Yeelight Sunflower hub
|
|
||||||
hub = yeelightsunflower.Hub(host)
|
hub = yeelightsunflower.Hub(host)
|
||||||
|
|
||||||
# Verify that hub is responsive
|
|
||||||
if not hub.available:
|
if not hub.available:
|
||||||
_LOGGER.error('Could not connect to Yeelight Sunflower hub')
|
_LOGGER.error('Could not connect to Yeelight Sunflower hub')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Add devices
|
|
||||||
add_devices(SunflowerBulb(light) for light in hub.get_lights())
|
add_devices(SunflowerBulb(light) for light in hub.get_lights())
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Sensor for Fedex packages.
|
Sensor for Fedex packages.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
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
|
from collections import defaultdict
|
||||||
import logging
|
import logging
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Sensor for UPS packages.
|
Sensor for UPS packages.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
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
|
from collections import defaultdict
|
||||||
import logging
|
import logging
|
||||||
|
Loading…
x
Reference in New Issue
Block a user