Minor updates
This commit is contained in:
parent
676f426a53
commit
3bef0ad30f
2 changed files with 4 additions and 3 deletions
|
@ -63,13 +63,14 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
|
||||
# Verify that passed in configuration works
|
||||
if not hub.is_valid_login():
|
||||
_LOGGER.error('Could not connect to AwesomeLight hub')
|
||||
_LOGGER.error("Could not connect to AwesomeLight hub")
|
||||
return False
|
||||
|
||||
# Add devices
|
||||
add_devices(AwesomeLight(light) for light in hub.lights())
|
||||
|
||||
|
||||
|
||||
class AwesomeLight(Light):
|
||||
"""Representation of an Awesome Light."""
|
||||
|
||||
|
@ -87,7 +88,7 @@ class AwesomeLight(Light):
|
|||
|
||||
@property
|
||||
def brightness(self):
|
||||
"""Brightness of the light (an integer in the range 1-255).
|
||||
"""Return the brightness of the light.
|
||||
|
||||
This method is optional. Removing it indicates to Home Assistant
|
||||
that brightness is not supported for this light.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue