Docstrings (#2502)

* Update docstrings

* Update docstrings

* Add link to docs
This commit is contained in:
Fabian Affolter 2016-07-12 16:46:29 +02:00 committed by GitHub
parent 45a8b74d7f
commit bef2f87ddc
6 changed files with 14 additions and 13 deletions

View File

@ -2,7 +2,7 @@
Interfaces with SimpliSafe alarm control panel. Interfaces with SimpliSafe alarm control panel.
For more details about this platform, please refer to the documentation at For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/simplisafe/ https://home-assistant.io/components/alarm_control_panel.simplisafe/
""" """
import logging import logging
@ -36,10 +36,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
# pylint: disable=abstract-method # pylint: disable=abstract-method
class SimpliSafeAlarm(alarm.AlarmControlPanel): class SimpliSafeAlarm(alarm.AlarmControlPanel):
"""Represents a SimpliSafe alarm status.""" """Representation a SimpliSafe alarm."""
def __init__(self, name, username, password, code): def __init__(self, name, username, password, code):
"""Initialize the SimpliSafe alaram.""" """Initialize the SimpliSafe alarm."""
from simplisafe import SimpliSafe from simplisafe import SimpliSafe
self.simplisafe = SimpliSafe(username, password) self.simplisafe = SimpliSafe(username, password)
self._name = name self._name = name

View File

@ -18,7 +18,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class DemoCamera(Camera): class DemoCamera(Camera):
"""A Demo camera.""" """The representation of a Demo camera."""
def __init__(self, name): def __init__(self, name):
"""Initialize demo camera component.""" """Initialize demo camera component."""

View File

@ -18,7 +18,7 @@ LIGHT_TEMPS = [240, 380]
def setup_platform(hass, config, add_devices_callback, discovery_info=None): def setup_platform(hass, config, add_devices_callback, discovery_info=None):
"""Setup demo light platform.""" """Setup the demo light platform."""
add_devices_callback([ add_devices_callback([
DemoLight("Bed Light", False), DemoLight("Bed Light", False),
DemoLight("Ceiling Lights", True, LIGHT_COLORS[0], LIGHT_TEMPS[1]), DemoLight("Ceiling Lights", True, LIGHT_COLORS[0], LIGHT_TEMPS[1]),
@ -27,7 +27,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
class DemoLight(Light): class DemoLight(Light):
"""Provide a demo light.""" """Represenation of a demo light."""
# pylint: disable=too-many-arguments # pylint: disable=too-many-arguments
def __init__(self, name, state, rgb=None, ct=None, brightness=180): def __init__(self, name, state, rgb=None, ct=None, brightness=180):

View File

@ -1,7 +1,8 @@
""" """
Imap sensor support. IMAP sensor support.
Checks an email account for unread emails. For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.imap/
""" """
import logging import logging
import voluptuous as vol import voluptuous as vol
@ -47,7 +48,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class ImapSensor(Entity): class ImapSensor(Entity):
"""IMAP sensor class.""" """Representation of an IMAP sensor."""
# pylint: disable=too-many-arguments # pylint: disable=too-many-arguments
def __init__(self, name, user, password, server, port): def __init__(self, name, user, password, server, port):
@ -62,7 +63,7 @@ class ImapSensor(Entity):
self.update() self.update()
def _login(self): def _login(self):
"""Login and return a imap connection.""" """Login and return an IMAP connection."""
import imaplib import imaplib
try: try:
connection = imaplib.IMAP4_SSL(self._server, self._port) connection = imaplib.IMAP4_SSL(self._server, self._port)

View File

@ -15,7 +15,7 @@ DEPENDENCIES = []
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the mysensors platform for sensors.""" """Setup the MySensors platform for sensors."""
# Only act if loaded via mysensors by discovery event. # Only act if loaded via mysensors by discovery event.
# Otherwise gateway is not setup. # Otherwise gateway is not setup.
if discovery_info is None: if discovery_info is None:
@ -72,7 +72,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class MySensorsSensor(mysensors.MySensorsDeviceEntity, Entity): class MySensorsSensor(mysensors.MySensorsDeviceEntity, Entity):
"""Represent the value of a MySensors Sensor child node.""" """Representation of a MySensors Sensor child node."""
@property @property
def state(self): def state(self):

View File

@ -18,7 +18,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
class DemoSwitch(SwitchDevice): class DemoSwitch(SwitchDevice):
"""representation of a demo switch.""" """Representation of a demo switch."""
def __init__(self, name, state, icon, assumed): def __init__(self, name, state, icon, assumed):
"""Initialize the Demo switch.""" """Initialize the Demo switch."""