Skip to content

Commit e1412a2

Browse files
authored
Update docstring (quotes, links, content) (home-assistant#5602)
1 parent 72bc8fc commit e1412a2

File tree

9 files changed

+32
-33
lines changed

9 files changed

+32
-33
lines changed

homeassistant/components/device_tracker/linksys_ap.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414

1515
import homeassistant.helpers.config_validation as cv
1616
from homeassistant.components.device_tracker import DOMAIN, PLATFORM_SCHEMA
17-
from homeassistant.const import (CONF_HOST, CONF_PASSWORD, CONF_USERNAME,
18-
CONF_VERIFY_SSL)
17+
from homeassistant.const import (
18+
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_VERIFY_SSL)
1919
from homeassistant.util import Throttle
2020

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

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

8584
with self.lock:
86-
_LOGGER.info('Checking Linksys AP')
85+
_LOGGER.info("Checking Linksys AP")
8786

8887
self.last_results = []
8988
for interface in range(INTERFACES):

homeassistant/components/device_tracker/sky_hub.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
Support for Sky Hub.
33
4-
# Example configuration.yaml entry
5-
device_tracker:
6-
- platform: sky_hub
7-
host: 192.168.1.254
4+
For more details about this platform, please refer to the documentation at
5+
https://home-assistant.io/components/device_tracker.sky_hub/
86
"""
97
import logging
108
import re
@@ -20,13 +18,11 @@
2018
from homeassistant.const import CONF_HOST
2119
from homeassistant.util import Throttle
2220

23-
# Return cached results if last scan was less then this time ago.
24-
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
25-
2621
_LOGGER = logging.getLogger(__name__)
27-
2822
_MAC_REGEX = re.compile(r'(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})')
2923

24+
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
25+
3026
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
3127
vol.Required(CONF_HOST): cv.string
3228
})
@@ -45,7 +41,7 @@ class SkyHubDeviceScanner(DeviceScanner):
4541

4642
def __init__(self, config):
4743
"""Initialise the scanner."""
48-
_LOGGER.info('Initialising Sky Hub')
44+
_LOGGER.info("Initialising Sky Hub")
4945
self.host = config.get(CONF_HOST, '192.168.1.254')
5046

5147
self.lock = threading.Lock()
@@ -86,7 +82,7 @@ def _update_info(self):
8682
return False
8783

8884
with self.lock:
89-
_LOGGER.info('Scanning')
85+
_LOGGER.info("Scanning")
9086

9187
data = _get_skyhub_data(self.url)
9288

homeassistant/components/device_tracker/tado.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Support for Tado Smart Thermostat.
33
4-
Device tracker platform that supports presence detection.
5-
The detection is based on geofencing enabled devices used with Tado.
4+
For more details about this platform, please refer to the documentation at
5+
https://home-assistant.io/components/device_tracker.tado/
66
"""
77
import logging
88
from datetime import timedelta
@@ -17,15 +17,14 @@
1717
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
1818
import homeassistant.helpers.config_validation as cv
1919
from homeassistant.util import Throttle
20-
from homeassistant.components.device_tracker import \
21-
DOMAIN, PLATFORM_SCHEMA, DeviceScanner
20+
from homeassistant.components.device_tracker import (
21+
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
2222
from homeassistant.helpers.aiohttp_client import async_create_clientsession
2323

24-
# Return cached results if last scan was less then this time ago
25-
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=30)
26-
2724
_LOGGER = logging.getLogger(__name__)
2825

26+
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=30)
27+
2928
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
3029
vol.Required(CONF_PASSWORD): cv.string,
3130
vol.Required(CONF_USERNAME): cv.string

homeassistant/components/light/avion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self, device):
5555

5656
self._name = device['name']
5757
self._address = device['address']
58-
self._key = device["key"]
58+
self._key = device['key']
5959
self._brightness = 255
6060
self._state = False
6161
self._switch = avion.avion(self._address, self._key)

homeassistant/components/lutron.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
Component for interacting with a Lutron RadioRA 2 system.
33
4-
Uses pylutron (http://github.com/thecynic/pylutron).
4+
For more details about this component, please refer to the documentation at
5+
https://home-assistant.io/components/lutron/
56
"""
6-
77
import logging
88

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

16-
DOMAIN = "lutron"
16+
DOMAIN = 'lutron'
1717

1818
_LOGGER = logging.getLogger(__name__)
1919

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

4343
group = get_component('group')
4444

homeassistant/components/notify/discord.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
"""Discord platform for notify component."""
1+
"""
2+
Discord platform for notify component.
3+
4+
For more details about this platform, please refer to the documentation at
5+
https://home-assistant.io/components/notify.discord/
6+
"""
27
import logging
38
import asyncio
49
import voluptuous as vol

homeassistant/components/sensor/wsdot.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
22
Support for Washington State Department of Transportation (WSDOT) data.
33
4-
Data provided by WSDOT is documented at http://wsdot.com/traffic/api/
4+
For more details about this platform, please refer to the documentation at
5+
https://home-assistant.io/components/sensor.wsdot/
56
"""
67
import logging
78
import re
@@ -17,7 +18,6 @@
1718
from homeassistant.helpers.entity import Entity
1819
import homeassistant.helpers.config_validation as cv
1920

20-
2121
_LOGGER = logging.getLogger(__name__)
2222

2323
CONF_TRAVEL_TIMES = 'travel_time'
@@ -109,7 +109,7 @@ def update(self):
109109

110110
response = requests.get(self.RESOURCE, params, timeout=10)
111111
if response.status_code != 200:
112-
_LOGGER.warning('Invalid response from WSDOT API.')
112+
_LOGGER.warning("Invalid response from WSDOT API")
113113
else:
114114
self._data = response.json()
115115
self._state = self._data.get(ATTR_CURRENT_TIME)

homeassistant/components/tts/amazon_polly.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Support for the Amazon Polly text to speech service.
33
44
For more details about this component, please refer to the documentation at
5-
https://home-assistant.io/components/tts/amazon_polly/
5+
https://home-assistant.io/components/tts.amazon_polly/
66
"""
77
import logging
88
import voluptuous as vol

homeassistant/components/zabbix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
_LOGGER = logging.getLogger(__name__)
1919

2020
DEFAULT_SSL = False
21-
DEFAULT_PATH = "zabbix"
21+
DEFAULT_PATH = 'zabbix'
2222

2323
DOMAIN = 'zabbix'
2424

0 commit comments

Comments
 (0)