core/homeassistant/components/switch/zigbee.py

25 lines
692 B
Python
Raw Normal View History

2016-01-24 08:02:14 +00:00
"""
Contains functionality to use a ZigBee device as a switch.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.zigbee/
"""
from homeassistant.components.switch import SwitchDevice
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-07-13 12:47:29 +00:00
"""Setup the ZigBee switch platform."""
2016-01-24 08:02:14 +00:00
add_entities([
ZigBeeSwitch(hass, ZigBeeDigitalOutConfig(config))
2016-01-24 08:02:14 +00:00
])
class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice):
2016-03-08 12:35:39 +00:00
"""Representation of a ZigBee Digital Out device."""
pass