From a784f48022c556eb0151509658d585982b70a933 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Aug 2016 11:14:24 +0200 Subject: [PATCH] Minor changes (#2784) * Update link to docs * Use fast.com * Update docstring * Add link to docs * Add link to docs * Update docstrings * Update docstrings * Fix typo --- homeassistant/components/camera/ffmpeg.py | 2 +- homeassistant/components/camera/mjpeg.py | 2 +- homeassistant/components/foursquare.py | 2 +- homeassistant/components/light/mqtt_json.py | 4 ++-- homeassistant/components/panel_custom.py | 7 ++++++- homeassistant/components/pilight.py | 9 +++------ homeassistant/components/sensor/fastdotcom.py | 4 ++-- homeassistant/components/sensor/serial_pm.py | 2 +- homeassistant/components/sensor/worldclock.py | 2 +- 9 files changed, 18 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/camera/ffmpeg.py b/homeassistant/components/camera/ffmpeg.py index 38fb6d7328f..6803ebb49a3 100644 --- a/homeassistant/components/camera/ffmpeg.py +++ b/homeassistant/components/camera/ffmpeg.py @@ -37,7 +37,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): class FFmpegCamera(Camera): - """An implementation of an IP camera that is reachable over a URL.""" + """An implementation of an FFmpeg camera.""" def __init__(self, config): """Initialize a FFmpeg camera.""" diff --git a/homeassistant/components/camera/mjpeg.py b/homeassistant/components/camera/mjpeg.py index c14a3a6c69e..dce8ac30440 100644 --- a/homeassistant/components/camera/mjpeg.py +++ b/homeassistant/components/camera/mjpeg.py @@ -29,7 +29,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): def extract_image_from_mjpeg(stream): - """Take in a mjpeg stream object, return the jpg from it.""" + """Take in a MJPEG stream object, return the jpg from it.""" data = b'' for chunk in stream: data += chunk diff --git a/homeassistant/components/foursquare.py b/homeassistant/components/foursquare.py index 57fa441774c..6fcd2312bab 100644 --- a/homeassistant/components/foursquare.py +++ b/homeassistant/components/foursquare.py @@ -40,7 +40,7 @@ DEPENDENCIES = ["http"] def setup(hass, config): - """Setup the notify services.""" + """Setup the Foursquare component.""" descriptions = load_yaml_config_file( os.path.join(os.path.dirname(__file__), "services.yaml")) diff --git a/homeassistant/components/light/mqtt_json.py b/homeassistant/components/light/mqtt_json.py index bd8ea589252..76db3fe9f0c 100755 --- a/homeassistant/components/light/mqtt_json.py +++ b/homeassistant/components/light/mqtt_json.py @@ -56,7 +56,7 @@ PLATFORM_SCHEMA = vol.Schema({ def setup_platform(hass, config, add_devices_callback, discovery_info=None): - """Add MQTT JSON Light.""" + """Setup a MQTT JSON Light.""" add_devices_callback([MqttJson( hass, config[CONF_NAME], @@ -81,7 +81,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): class MqttJson(Light): - """MQTT JSON light.""" + """Representation of a MQTT JSON light.""" # pylint: disable=too-many-arguments,too-many-instance-attributes def __init__(self, hass, name, topic, qos, retain, diff --git a/homeassistant/components/panel_custom.py b/homeassistant/components/panel_custom.py index e4b2480f6d4..7806cc4cac8 100644 --- a/homeassistant/components/panel_custom.py +++ b/homeassistant/components/panel_custom.py @@ -1,4 +1,9 @@ -"""Register a custom front end panel.""" +""" +Register a custom front end panel. + +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/panel_custom/ +""" import logging import os diff --git a/homeassistant/components/pilight.py b/homeassistant/components/pilight.py index c1b8c1e26e0..07771acee00 100644 --- a/homeassistant/components/pilight.py +++ b/homeassistant/components/pilight.py @@ -1,11 +1,8 @@ """ Component to create an interface to a Pilight daemon (https://pilight.org/). -Pilight can be used to send and receive signals from a radio frequency -module (RF receiver). - -RF commands received by the daemon are put on the HA event bus. -RF commands can also be send with a pilight.send service call. +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/pilight/ """ # pylint: disable=import-error import logging @@ -45,7 +42,7 @@ _LOGGER = logging.getLogger(__name__) def setup(hass, config): - """Setup pilight component.""" + """Setup the pilight component.""" from pilight import pilight try: diff --git a/homeassistant/components/sensor/fastdotcom.py b/homeassistant/components/sensor/fastdotcom.py index 74bfd88366f..fbdf6220c91 100644 --- a/homeassistant/components/sensor/fastdotcom.py +++ b/homeassistant/components/sensor/fastdotcom.py @@ -24,7 +24,7 @@ CONF_DAY = 'day' def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the Speedtest sensor.""" + """Setup the Fast.com sensor.""" data = SpeedtestData(hass, config) sensor = SpeedtestSensor(data) add_devices([sensor]) @@ -39,7 +39,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): # pylint: disable=too-few-public-methods class SpeedtestSensor(Entity): - """Implementation of a speedtest.net sensor.""" + """Implementation of a FAst.com sensor.""" def __init__(self, speedtest_data): """Initialize the sensor.""" diff --git a/homeassistant/components/sensor/serial_pm.py b/homeassistant/components/sensor/serial_pm.py index 0dd6259d083..f625affce2c 100644 --- a/homeassistant/components/sensor/serial_pm.py +++ b/homeassistant/components/sensor/serial_pm.py @@ -2,7 +2,7 @@ Support for particulate matter sensors connected to a serial port. For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/sensor.particulate_matter/ +https://home-assistant.io/components/sensor.serial_pm/ """ import logging import voluptuous as vol diff --git a/homeassistant/components/sensor/worldclock.py b/homeassistant/components/sensor/worldclock.py index 84a58dcd75a..0cfc4598cd0 100644 --- a/homeassistant/components/sensor/worldclock.py +++ b/homeassistant/components/sensor/worldclock.py @@ -34,7 +34,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class WorldClockSensor(Entity): - """Represenatation of a Worldclock sensor.""" + """Representation of a Worldclock sensor.""" def __init__(self, time_zone, name): """Initialize the sensor."""