mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
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
This commit is contained in:
parent
e926426af9
commit
a784f48022
@ -37,7 +37,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
|
|
||||||
|
|
||||||
class FFmpegCamera(Camera):
|
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):
|
def __init__(self, config):
|
||||||
"""Initialize a FFmpeg camera."""
|
"""Initialize a FFmpeg camera."""
|
||||||
|
@ -29,7 +29,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
|
|
||||||
|
|
||||||
def extract_image_from_mjpeg(stream):
|
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''
|
data = b''
|
||||||
for chunk in stream:
|
for chunk in stream:
|
||||||
data += chunk
|
data += chunk
|
||||||
|
@ -40,7 +40,7 @@ DEPENDENCIES = ["http"]
|
|||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Setup the notify services."""
|
"""Setup the Foursquare component."""
|
||||||
descriptions = load_yaml_config_file(
|
descriptions = load_yaml_config_file(
|
||||||
os.path.join(os.path.dirname(__file__), "services.yaml"))
|
os.path.join(os.path.dirname(__file__), "services.yaml"))
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ PLATFORM_SCHEMA = vol.Schema({
|
|||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
"""Add MQTT JSON Light."""
|
"""Setup a MQTT JSON Light."""
|
||||||
add_devices_callback([MqttJson(
|
add_devices_callback([MqttJson(
|
||||||
hass,
|
hass,
|
||||||
config[CONF_NAME],
|
config[CONF_NAME],
|
||||||
@ -81,7 +81,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
|
|
||||||
|
|
||||||
class MqttJson(Light):
|
class MqttJson(Light):
|
||||||
"""MQTT JSON light."""
|
"""Representation of a MQTT JSON light."""
|
||||||
|
|
||||||
# pylint: disable=too-many-arguments,too-many-instance-attributes
|
# pylint: disable=too-many-arguments,too-many-instance-attributes
|
||||||
def __init__(self, hass, name, topic, qos, retain,
|
def __init__(self, hass, name, topic, qos, retain,
|
||||||
|
@ -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 logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
"""
|
"""
|
||||||
Component to create an interface to a Pilight daemon (https://pilight.org/).
|
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
|
For more details about this component, please refer to the documentation at
|
||||||
module (RF receiver).
|
https://home-assistant.io/components/pilight/
|
||||||
|
|
||||||
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.
|
|
||||||
"""
|
"""
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
import logging
|
import logging
|
||||||
@ -45,7 +42,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Setup pilight component."""
|
"""Setup the pilight component."""
|
||||||
from pilight import pilight
|
from pilight import pilight
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -24,7 +24,7 @@ CONF_DAY = 'day'
|
|||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the Speedtest sensor."""
|
"""Setup the Fast.com sensor."""
|
||||||
data = SpeedtestData(hass, config)
|
data = SpeedtestData(hass, config)
|
||||||
sensor = SpeedtestSensor(data)
|
sensor = SpeedtestSensor(data)
|
||||||
add_devices([sensor])
|
add_devices([sensor])
|
||||||
@ -39,7 +39,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
# pylint: disable=too-few-public-methods
|
# pylint: disable=too-few-public-methods
|
||||||
class SpeedtestSensor(Entity):
|
class SpeedtestSensor(Entity):
|
||||||
"""Implementation of a speedtest.net sensor."""
|
"""Implementation of a FAst.com sensor."""
|
||||||
|
|
||||||
def __init__(self, speedtest_data):
|
def __init__(self, speedtest_data):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Support for particulate matter sensors connected to a serial port.
|
Support for particulate matter sensors connected to a serial port.
|
||||||
|
|
||||||
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/sensor.particulate_matter/
|
https://home-assistant.io/components/sensor.serial_pm/
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
@ -34,7 +34,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
|
|
||||||
class WorldClockSensor(Entity):
|
class WorldClockSensor(Entity):
|
||||||
"""Represenatation of a Worldclock sensor."""
|
"""Representation of a Worldclock sensor."""
|
||||||
|
|
||||||
def __init__(self, time_zone, name):
|
def __init__(self, time_zone, name):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user