Update docstrings (#7361)

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2017-04-29 22:04:49 -07:00
1 parent e22e70a01a
commit 3ee4d1060f
264 files changed
+1686 -1768

No files matched your search

+7 -7
View File
@@ -56,7 +56,7 @@ def _discover(hass, config, component_name, found_tellcore_devices):
def setup(hass, config):
"""Setup the Tellstick component."""
"""Set up the Tellstick component."""
from tellcore.constants import TELLSTICK_DIM
from tellcore.telldus import AsyncioCallbackDispatcher
from tellcore.telldus import TelldusCore
@@ -151,7 +151,7 @@ class TellstickDevice(Entity):
"""
def __init__(self, tellcore_id, tellcore_registry, signal_repetitions):
"""Initalize the Tellstick device."""
"""Init the Tellstick device."""
self._signal_repetitions = signal_repetitions
self._state = None
self._requested_state = None
@@ -217,7 +217,7 @@ class TellstickDevice(Entity):
_LOGGER.error(err)
def _change_device_state(self, new_state, data):
"""The logic for actually turning on or off the device."""
"""Turn on or off the device."""
with TELLSTICK_LOCK:
# Set the requested state and number of repeats before calling
# _send_repeated_command the first time. Subsequent calls will be
@@ -244,8 +244,8 @@ class TellstickDevice(Entity):
def _update_model_from_command(self, tellcore_command, tellcore_data):
"""Update the model, from a sent tellcore command and data."""
from tellcore.constants import (TELLSTICK_TURNON, TELLSTICK_TURNOFF,
TELLSTICK_DIM)
from tellcore.constants import (
TELLSTICK_TURNON, TELLSTICK_TURNOFF, TELLSTICK_DIM)
if tellcore_command not in [TELLSTICK_TURNON, TELLSTICK_TURNOFF,
TELLSTICK_DIM]:
@@ -268,8 +268,8 @@ class TellstickDevice(Entity):
def _update_from_tellcore(self):
"""Read the current state of the device from the tellcore library."""
from tellcore.library import TelldusError
from tellcore.constants import (TELLSTICK_TURNON, TELLSTICK_TURNOFF,
TELLSTICK_DIM)
from tellcore.constants import (
TELLSTICK_TURNON, TELLSTICK_TURNOFF, TELLSTICK_DIM)
with TELLSTICK_LOCK:
try: