2016-01-24 08:02:14 +00:00
|
|
|
"""
|
2016-03-07 21:08:21 +00:00
|
|
|
Functionality to use a ZigBee device as a light.
|
2016-01-29 12:00:53 +00:00
|
|
|
|
2016-02-01 10:47:09 +00:00
|
|
|
For more details about this platform, please refer to the documentation at
|
|
|
|
https://home-assistant.io/components/light.zigbee/
|
|
|
|
"""
|
2016-01-29 12:00:53 +00:00
|
|
|
from homeassistant.components.light import Light
|
2016-01-24 08:02:14 +00:00
|
|
|
from homeassistant.components.zigbee import (
|
|
|
|
ZigBeeDigitalOut, ZigBeeDigitalOutConfig)
|
|
|
|
|
|
|
|
DEPENDENCIES = ["zigbee"]
|
|
|
|
|
|
|
|
|
|
|
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
2016-03-07 21:08:21 +00:00
|
|
|
"""Create and add an entity based on the configuration."""
|
2016-01-24 08:02:14 +00:00
|
|
|
add_entities([
|
2016-01-29 12:00:53 +00:00
|
|
|
ZigBeeLight(hass, ZigBeeDigitalOutConfig(config))
|
2016-01-24 08:02:14 +00:00
|
|
|
])
|
2016-01-29 12:00:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ZigBeeLight(ZigBeeDigitalOut, Light):
|
2016-03-07 21:08:21 +00:00
|
|
|
"""Use ZigBeeDigitalOut as light."""
|
|
|
|
|
2016-01-29 12:00:53 +00:00
|
|
|
pass
|