Merge pull request #1023 from flyte/zigbee-pr
Add ZigBee integration and components.
This commit is contained in:
commit
f87c7d6732
7 files changed
+496
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
homeassistant.components.switch.zigbee
|
||||
|
||||
Contains functionality to use a ZigBee device as a switch.
|
||||
"""
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.components.zigbee import (
|
||||
ZigBeeDigitalOut, ZigBeeDigitalOutConfig)
|
||||
|
||||
|
||||
DEPENDENCIES = ["zigbee"]
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""
|
||||
Create and add an entity based on the configuration.
|
||||
"""
|
||||
add_entities([
|
||||
ZigBeeSwitch(hass, ZigBeeDigitalOutConfig(config))
|
||||
])
|
||||
|
||||
|
||||
class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice):
|
||||
"""
|
||||
Use multiple inheritance to turn a ZigBeeDigitalOut into a SwitchDevice.
|
||||
"""
|
||||
pass
|
||||
Reference in new issue
Block a user