Docstrings (#2502)

* Update docstrings

* Update docstrings

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

No files matched your search

+5 -4
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 voluptuous as vol
@@ -47,7 +48,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class ImapSensor(Entity):
"""IMAP sensor class."""
"""Representation of an IMAP sensor."""
# pylint: disable=too-many-arguments
def __init__(self, name, user, password, server, port):
@@ -62,7 +63,7 @@ class ImapSensor(Entity):
self.update()
def _login(self):
"""Login and return a imap connection."""
"""Login and return an IMAP connection."""
import imaplib
try:
connection = imaplib.IMAP4_SSL(self._server, self._port)
+2 -2
View File
@@ -15,7 +15,7 @@ DEPENDENCIES = []
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.
# Otherwise gateway is not setup.
if discovery_info is None:
@@ -72,7 +72,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class MySensorsSensor(mysensors.MySensorsDeviceEntity, Entity):
"""Represent the value of a MySensors Sensor child node."""
"""Representation of a MySensors Sensor child node."""
@property
def state(self):