2016-01-24 08:02:14 +00:00
|
|
|
"""
|
|
|
|
Contains functionality to use a ZigBee device as a binary sensor.
|
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/binary_sensor.zigbee/
|
|
|
|
"""
|
2016-01-29 12:00:53 +00:00
|
|
|
from homeassistant.components.binary_sensor import BinarySensorDevice
|
2016-01-24 08:02:14 +00:00
|
|
|
from homeassistant.components.zigbee import (
|
|
|
|
ZigBeeDigitalIn, ZigBeeDigitalInConfig)
|
|
|
|
|
|
|
|
DEPENDENCIES = ["zigbee"]
|
|
|
|
|
|
|
|
|
|
|
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
2016-07-13 12:47:29 +00:00
|
|
|
"""Setup the ZigBee binary sensor platform."""
|
2016-01-24 08:02:14 +00:00
|
|
|
add_entities([
|
2016-01-29 12:00:53 +00:00
|
|
|
ZigBeeBinarySensor(hass, ZigBeeDigitalInConfig(config))
|
2016-01-24 08:02:14 +00:00
|
|
|
])
|
2016-01-29 12:00:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice):
|
2016-03-07 19:21:08 +00:00
|
|
|
"""Use ZigBeeDigitalIn as binary sensor."""
|
|
|
|
|
2016-01-29 12:00:53 +00:00
|
|
|
pass
|