Skip to content

Commit

Permalink
Update docstring (quotes, links, content) (home-assistant#5602)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored Jan 28, 2017
1 parent 72bc8fc commit e1412a2
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 33 deletions.
9 changes: 4 additions & 5 deletions homeassistant/components/device_tracker/linksys_ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

import homeassistant.helpers.config_validation as cv
from homeassistant.components.device_tracker import DOMAIN, PLATFORM_SCHEMA
from homeassistant.const import (CONF_HOST, CONF_PASSWORD, CONF_USERNAME,
CONF_VERIFY_SSL)
from homeassistant.const import (
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_VERIFY_SSL)
from homeassistant.util import Throttle

# Return cached results if last scan was less then this time ago.
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=5)
INTERFACES = 2
DEFAULT_TIMEOUT = 10
Expand Down Expand Up @@ -59,7 +58,7 @@ def __init__(self, config):
# Check if the access point is accessible
response = self._make_request()
if not response.status_code == 200:
raise ConnectionError('Cannot connect to Linksys Access Point')
raise ConnectionError("Cannot connect to Linksys Access Point")

def scan_devices(self):
"""Scan for new devices and return a list with found device IDs."""
Expand All @@ -83,7 +82,7 @@ def _update_info(self):
from bs4 import BeautifulSoup as BS

with self.lock:
_LOGGER.info('Checking Linksys AP')
_LOGGER.info("Checking Linksys AP")

self.last_results = []
for interface in range(INTERFACES):
Expand Down
16 changes: 6 additions & 10 deletions homeassistant/components/device_tracker/sky_hub.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
"""
Support for Sky Hub.
# Example configuration.yaml entry
device_tracker:
- platform: sky_hub
host: 192.168.1.254
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.sky_hub/
"""
import logging
import re
Expand All @@ -20,13 +18,11 @@
from homeassistant.const import CONF_HOST
from homeassistant.util import Throttle

# Return cached results if last scan was less then this time ago.
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)

_LOGGER = logging.getLogger(__name__)

_MAC_REGEX = re.compile(r'(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})')

MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): cv.string
})
Expand All @@ -45,7 +41,7 @@ class SkyHubDeviceScanner(DeviceScanner):

def __init__(self, config):
"""Initialise the scanner."""
_LOGGER.info('Initialising Sky Hub')
_LOGGER.info("Initialising Sky Hub")
self.host = config.get(CONF_HOST, '192.168.1.254')

self.lock = threading.Lock()
Expand Down Expand Up @@ -86,7 +82,7 @@ def _update_info(self):
return False

with self.lock:
_LOGGER.info('Scanning')
_LOGGER.info("Scanning")

data = _get_skyhub_data(self.url)

Expand Down
13 changes: 6 additions & 7 deletions homeassistant/components/device_tracker/tado.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Support for Tado Smart Thermostat.
Device tracker platform that supports presence detection.
The detection is based on geofencing enabled devices used with Tado.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.tado/
"""
import logging
from datetime import timedelta
Expand All @@ -17,15 +17,14 @@
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle
from homeassistant.components.device_tracker import \
DOMAIN, PLATFORM_SCHEMA, DeviceScanner
from homeassistant.components.device_tracker import (
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
from homeassistant.helpers.aiohttp_client import async_create_clientsession

# Return cached results if last scan was less then this time ago
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=30)

_LOGGER = logging.getLogger(__name__)

MIN_TIME_BETWEEN_SCANS = timedelta(seconds=30)

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/light/avion.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, device):

self._name = device['name']
self._address = device['address']
self._key = device["key"]
self._key = device['key']
self._brightness = 255
self._state = False
self._switch = avion.avion(self._address, self._key)
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/lutron.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Component for interacting with a Lutron RadioRA 2 system.
Uses pylutron (http://github.com/thecynic/pylutron).
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/lutron/
"""

import logging

from homeassistant.helpers import discovery
Expand All @@ -13,7 +13,7 @@
REQUIREMENTS = ['https://github.com/thecynic/pylutron/archive/v0.1.0.zip#'
'pylutron==0.1.0']

DOMAIN = "lutron"
DOMAIN = 'lutron'

_LOGGER = logging.getLogger(__name__)

Expand All @@ -38,7 +38,7 @@ def setup(hass, base_config):
)
hass.data[LUTRON_CONTROLLER].load_xml_db()
hass.data[LUTRON_CONTROLLER].connect()
_LOGGER.info("Connected to Main Repeater @ %s", config['lutron_host'])
_LOGGER.info("Connected to Main Repeater at %s", config['lutron_host'])

group = get_component('group')

Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/notify/discord.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Discord platform for notify component."""
"""
Discord platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.discord/
"""
import logging
import asyncio
import voluptuous as vol
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/sensor/wsdot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
Support for Washington State Department of Transportation (WSDOT) data.
Data provided by WSDOT is documented at http://wsdot.com/traffic/api/
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.wsdot/
"""
import logging
import re
Expand All @@ -17,7 +18,6 @@
from homeassistant.helpers.entity import Entity
import homeassistant.helpers.config_validation as cv


_LOGGER = logging.getLogger(__name__)

CONF_TRAVEL_TIMES = 'travel_time'
Expand Down Expand Up @@ -109,7 +109,7 @@ def update(self):

response = requests.get(self.RESOURCE, params, timeout=10)
if response.status_code != 200:
_LOGGER.warning('Invalid response from WSDOT API.')
_LOGGER.warning("Invalid response from WSDOT API")
else:
self._data = response.json()
self._state = self._data.get(ATTR_CURRENT_TIME)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tts/amazon_polly.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Support for the Amazon Polly text to speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts/amazon_polly/
https://home-assistant.io/components/tts.amazon_polly/
"""
import logging
import voluptuous as vol
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
_LOGGER = logging.getLogger(__name__)

DEFAULT_SSL = False
DEFAULT_PATH = "zabbix"
DEFAULT_PATH = 'zabbix'

DOMAIN = 'zabbix'

Expand Down

0 comments on commit e1412a2

Please sign in to comment.