Update docstrings (#2513)

pull/2516/head
Fabian Affolter 2016-07-13 14:47:29 +02:00 committed by GitHub
parent 82e992c63c
commit 497bc6ac0d
10 changed files with 14 additions and 16 deletions

View File

@ -19,7 +19,7 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
"""Perform the setup for Envisalink sensor devices."""
"""Setup Envisalink binary sensor devices."""
_configured_zones = discovery_info['zones']
for zone_num in _configured_zones:
_device_config_data = ZONE_SCHEMA(_configured_zones[zone_num])

View File

@ -2,7 +2,7 @@
Contains functionality to use a KNX group address as a binary.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.knx/
https://home-assistant.io/components/binary_sensor.knx/
"""
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.knx import (
@ -12,13 +12,13 @@ DEPENDENCIES = ["knx"]
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Create and add an entity based on the configuration."""
"""Setup the KNX binary sensor platform."""
add_entities([
KNXSwitch(hass, KNXConfig(config))
])
class KNXSwitch(KNXGroupAddress, BinarySensorDevice):
"""Representation of a KNX sensor device."""
"""Representation of a KNX binary sensor device."""
pass

View File

@ -18,7 +18,7 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup nx584 sensors."""
"""Setup nx584 binary sensor platform."""
from nx584 import client as nx584_client
host = config.get('host', 'localhost:5007')

View File

@ -24,7 +24,7 @@ SENSOR_TYPES = {
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Wink platform."""
"""Setup the Wink binary sensor platform."""
import pywink
if discovery_info is None:
@ -44,7 +44,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class WinkBinarySensorDevice(WinkDevice, BinarySensorDevice, Entity):
"""Representation of a Wink sensor."""
"""Representation of a Wink binary sensor."""
def __init__(self, wink):
"""Initialize the Wink binary sensor."""

View File

@ -12,7 +12,7 @@ DEPENDENCIES = ["zigbee"]
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Create and add an entity based on the configuration."""
"""Setup the ZigBee binary sensor platform."""
add_entities([
ZigBeeBinarySensor(hass, ZigBeeDigitalInConfig(config))
])

View File

@ -31,7 +31,7 @@ DEVICE_MAPPINGS = {
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Z-Wave platform for sensors."""
"""Setup the Z-Wave platform for binary sensors."""
if discovery_info is None or zwave.NETWORK is None:
return

View File

@ -3,8 +3,6 @@ Support KNX switching actuators.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.knx/
(c) 2016 Daniel Matuschek <info@open-homeautomation.com>
"""
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.knx import (
@ -14,7 +12,7 @@ DEPENDENCIES = ["knx"]
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Create and add an entity based on the configuration."""
"""Setup the KNX switch platform."""
add_entities([
KNXSwitch(hass, KNXConfig(config))
])

View File

@ -13,7 +13,7 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Verisure platform."""
"""Setup the Verisure switch platform."""
if not int(hub.config.get('smartplugs', '1')):
return False

View File

@ -12,7 +12,7 @@ DEPENDENCIES = ["zigbee"]
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Create and add an entity based on the configuration."""
"""Setup the ZigBee switch platform."""
add_entities([
ZigBeeSwitch(hass, ZigBeeDigitalOutConfig(config))
])

View File

@ -1,5 +1,5 @@
"""
Zwave platform that handles simple binary switches.
Z-Wave platform that handles simple binary switches.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.zwave/
@ -12,7 +12,7 @@ from homeassistant.components import zwave
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Find and return Z-Wave switches."""
"""Setup the Z-Wave platform."""
if discovery_info is None or zwave.NETWORK is None:
return