Update docstrings (#7374)
* Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstring * Update docstrings * Update docstrings * Fix lint issues * Update docstrings * Revert changes in dict
This commit is contained in:
parent
0e08925259
commit
a4f1f6e724
340 changed files with 1533 additions and 1708 deletions
|
@ -6,12 +6,11 @@ https://home-assistant.io/components/light.tellstick/
|
|||
"""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.light import (ATTR_BRIGHTNESS,
|
||||
SUPPORT_BRIGHTNESS, Light)
|
||||
from homeassistant.components.tellstick import (DEFAULT_SIGNAL_REPETITIONS,
|
||||
ATTR_DISCOVER_DEVICES,
|
||||
ATTR_DISCOVER_CONFIG,
|
||||
DOMAIN, TellstickDevice)
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light)
|
||||
from homeassistant.components.tellstick import (
|
||||
DEFAULT_SIGNAL_REPETITIONS, ATTR_DISCOVER_DEVICES, ATTR_DISCOVER_CONFIG,
|
||||
DOMAIN, TellstickDevice)
|
||||
|
||||
PLATFORM_SCHEMA = vol.Schema({vol.Required("platform"): DOMAIN})
|
||||
|
||||
|
@ -20,14 +19,13 @@ SUPPORT_TELLSTICK = SUPPORT_BRIGHTNESS
|
|||
|
||||
# pylint: disable=unused-argument
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Set up Tellstick lights."""
|
||||
"""Set up the Tellstick lights."""
|
||||
if (discovery_info is None or
|
||||
discovery_info[ATTR_DISCOVER_DEVICES] is None):
|
||||
return
|
||||
|
||||
# Allow platform level override, fallback to module config
|
||||
signal_repetitions = discovery_info.get(ATTR_DISCOVER_CONFIG,
|
||||
DEFAULT_SIGNAL_REPETITIONS)
|
||||
signal_repetitions = discovery_info.get(
|
||||
ATTR_DISCOVER_CONFIG, DEFAULT_SIGNAL_REPETITIONS)
|
||||
|
||||
add_devices(TellstickLight(tellcore_id, hass.data['tellcore_registry'],
|
||||
signal_repetitions)
|
||||
|
@ -38,7 +36,7 @@ class TellstickLight(TellstickDevice, Light):
|
|||
"""Representation of a Tellstick light."""
|
||||
|
||||
def __init__(self, tellcore_id, tellcore_registry, signal_repetitions):
|
||||
"""Initialize the light."""
|
||||
"""Initialize the Tellstick light."""
|
||||
super().__init__(tellcore_id, tellcore_registry, signal_repetitions)
|
||||
|
||||
self._brightness = 255
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue