2016-07-10 17:36:54 +00:00
|
|
|
"""
|
|
|
|
Contains functionality to use a KNX group address as a binary.
|
|
|
|
|
|
|
|
For more details about this platform, please refer to the documentation at
|
2016-07-13 12:47:29 +00:00
|
|
|
https://home-assistant.io/components/binary_sensor.knx/
|
2016-07-10 17:36:54 +00:00
|
|
|
"""
|
|
|
|
from homeassistant.components.binary_sensor import BinarySensorDevice
|
2016-09-14 06:03:30 +00:00
|
|
|
from homeassistant.components.knx import (KNXConfig, KNXGroupAddress)
|
2016-07-10 17:36:54 +00:00
|
|
|
|
2016-09-14 06:03:30 +00:00
|
|
|
DEPENDENCIES = ['knx']
|
2016-07-10 17:36:54 +00:00
|
|
|
|
|
|
|
|
2016-09-14 06:03:30 +00:00
|
|
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
2017-04-30 05:04:49 +00:00
|
|
|
"""Set up the KNX binary sensor platform."""
|
2016-09-14 06:03:30 +00:00
|
|
|
add_devices([KNXSwitch(hass, KNXConfig(config))])
|
2016-07-10 17:36:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
class KNXSwitch(KNXGroupAddress, BinarySensorDevice):
|
2016-07-13 12:47:29 +00:00
|
|
|
"""Representation of a KNX binary sensor device."""
|
2016-07-10 17:36:54 +00:00
|
|
|
|
|
|
|
pass
|