mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Some more improvement
This commit is contained in:
parent
d740b90d69
commit
8683e077fc
@ -39,7 +39,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Initialize Awesome Light platform."""
|
"""Setup the Awesome Light platform."""
|
||||||
import awesomelights
|
import awesomelights
|
||||||
|
|
||||||
# Validate passed in config
|
# Validate passed in config
|
||||||
@ -63,8 +63,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
# Add devices
|
# Add devices
|
||||||
add_devices(AwesomeLight(light) for light in hub.lights())
|
add_devices(AwesomeLight(light) for light in hub.lights())
|
||||||
|
|
||||||
|
|
||||||
class AwesomeLight(Light):
|
class AwesomeLight(Light):
|
||||||
"""Representation an AwesomeLight in Home Assistant."""
|
"""Representation of an Awesome Light."""
|
||||||
|
|
||||||
def __init__(self, light):
|
def __init__(self, light):
|
||||||
"""Initialize an AwesomeLight."""
|
"""Initialize an AwesomeLight."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user