Grammar and spelling fixes (#16065)

This commit is contained in:
Ville Skyttä authored and Fabian Affolter committed 2018-08-19 22:29:08 +02:00
1 parent 9e1fa7ef42
commit dbd0763f83
244 files changed
+453 -453

No files matched your search

@@ -141,7 +141,7 @@ def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
@@ -45,7 +45,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
try:
simplisafe = SimpliSafeApiInterface(username, password)
except SimpliSafeAPIException:
_LOGGER.error("Failed to setup SimpliSafe")
_LOGGER.error("Failed to set up SimpliSafe")
return
systems = []
@@ -1,5 +1,5 @@
"""
Allow to setup simple automation rules via the config file.
Allow to set up simple automation rules via the config file.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/automation/
@@ -58,7 +58,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
@@ -90,7 +90,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
data = HikvisionData(hass, url, port, name, username, password)
if data.sensors is None:
_LOGGER.error("Hikvision event stream has no data, unable to setup")
_LOGGER.error("Hikvision event stream has no data, unable to set up")
return False
entities = []
+2 -2
View File
@@ -145,7 +145,7 @@ async def async_get_image(hass, entity_id, timeout=10):
component = hass.data.get(DOMAIN)
if component is None:
raise HomeAssistantError('Camera component not setup')
raise HomeAssistantError('Camera component not set up')
camera = component.get_entity(entity_id)
@@ -214,7 +214,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
@@ -6,10 +6,10 @@
},
"step": {
"confirm": {
"description": "Do you want to setup Google Cast?",
"description": "Do you want to set up Google Cast?",
"title": "Google Cast"
}
},
"title": "Google Cast"
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
"step": {
"confirm": {
"title": "Google Cast",
"description": "Do you want to setup Google Cast?"
"description": "Do you want to set up Google Cast?"
}
},
"abort": {
+1 -1
View File
@@ -294,7 +294,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
+1 -1
View File
@@ -105,7 +105,7 @@ async def async_setup_entry(hass, config_entry):
@callback
def async_add_remote(sensors):
"""Setup remote from deCONZ."""
"""Set up remote from deCONZ."""
from pydeconz.sensor import SWITCH as DECONZ_REMOTE
allow_clip_sensor = config_entry.data.get(CONF_ALLOW_CLIP_SENSOR, True)
for sensor in sensors:
@@ -57,7 +57,7 @@ class RitAssistDeviceScanner:
config.get(CONF_PASSWORD))
def setup(self, hass):
"""Setup a timer and start gathering devices."""
"""Set up a timer and start gathering devices."""
self._refresh()
track_utc_time_change(hass,
lambda now: self._refresh(),
+2 -2
View File
@@ -57,7 +57,7 @@ CONFIG_SCHEMA = vol.Schema({
async def async_setup(hass, config):
"""Setup the HomeKit component."""
"""Set up the HomeKit component."""
_LOGGER.debug('Begin setup HomeKit')
conf = config[DOMAIN]
@@ -196,7 +196,7 @@ class HomeKit():
self.driver = None
def setup(self):
"""Setup bridge and accessory driver."""
"""Set up bridge and accessory driver."""
from .accessories import HomeBridge, HomeDriver
self.hass.bus.async_listen_once(
+1 -1
View File
@@ -109,7 +109,7 @@ def show_setup_message(hass, pincode):
"""Display persistent notification with setup information."""
pin = pincode.decode()
_LOGGER.info('Pincode: %s', pin)
message = 'To setup Home Assistant in the Home App, enter the ' \
message = 'To set up Home Assistant in the Home App, enter the ' \
'following code:\n### {}'.format(pin)
hass.components.persistent_notification.create(
message, 'HomeKit Setup', HOMEKIT_NOTIFY_ID)
+4 -4
View File
@@ -1,4 +1,4 @@
"""Provide cors support for the HTTP component."""
"""Provide CORS support for the HTTP component."""
from aiohttp.hdrs import ACCEPT, ORIGIN, CONTENT_TYPE
@@ -17,7 +17,7 @@ ALLOWED_CORS_HEADERS = [
@callback
def setup_cors(app, origins):
"""Setup cors."""
"""Set up CORS."""
import aiohttp_cors
cors = aiohttp_cors.setup(app, defaults={
@@ -30,7 +30,7 @@ def setup_cors(app, origins):
cors_added = set()
def _allow_cors(route, config=None):
"""Allow cors on a route."""
"""Allow CORS on a route."""
if hasattr(route, 'resource'):
path = route.resource
else:
@@ -55,7 +55,7 @@ def setup_cors(app, origins):
return
async def cors_startup(app):
"""Initialize cors when app starts up."""
"""Initialize CORS when app starts up."""
for route in list(app.router.routes()):
_allow_cors(route)
+2 -2
View File
@@ -123,7 +123,7 @@ def setup(hass, config):
def autosetup_ihc_products(hass: HomeAssistantType, config, ihc_controller):
"""Auto setup of IHC products from the ihc project file."""
"""Auto setup of IHC products from the IHC project file."""
project_xml = ihc_controller.get_project()
if not project_xml:
_LOGGER.error("Unable to read project from ICH controller")
@@ -177,7 +177,7 @@ def get_discovery_info(component_setup, groups):
def setup_service_functions(hass: HomeAssistantType, ihc_controller):
"""Setup the IHC service functions."""
"""Set up the IHC service functions."""
def set_runtime_value_bool(call):
"""Set a IHC runtime bool value service function."""
ihc_id = call.data[ATTR_IHC_ID]
+7 -7
View File
@@ -1,26 +1,26 @@
# Describes the format for available ihc services
# Describes the format for available IHC services
set_runtime_value_bool:
description: Set a boolean runtime value on the ihc controller
description: Set a boolean runtime value on the IHC controller
fields:
ihc_id:
description: The integer ihc resource id
description: The integer IHC resource id
value:
description: The boolean value to set
set_runtime_value_int:
description: Set an integer runtime value on the ihc controller
description: Set an integer runtime value on the IHC controller
fields:
ihc_id:
description: The integer ihc resource id
description: The integer IHC resource id
value:
description: The integer value to set
set_runtime_value_float:
description: Set a float runtime value on the ihc controller
description: Set a float runtime value on the IHC controller
fields:
ihc_id:
description: The integer ihc resource id
description: The integer IHC resource id
value:
description: The float value to set
+1 -1
View File
@@ -382,7 +382,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
+2 -2
View File
@@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the ihc lights platform."""
"""Set up the IHC lights platform."""
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
info = hass.data[IHC_DATA][IHC_INFO]
devices = []
@@ -109,7 +109,7 @@ class IhcLight(IHCDevice, Light):
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
def on_ihc_change(self, ihc_id, value):
"""Callback from Ihc notifications."""
"""Callback from IHC notifications."""
if isinstance(value, bool):
self._dimmable = False
self._state = value != 0
+1 -1
View File
@@ -37,7 +37,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup LW-12 WiFi LED Controller platform."""
"""Set up LW-12 WiFi LED Controller platform."""
import lw12
# Assign configuration variables.
@@ -17,7 +17,7 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the BMW Connected Drive lock."""
"""Set up the BMW Connected Drive lock."""
accounts = hass.data[BMW_DOMAIN]
_LOGGER.debug('Found BMW accounts: %s',
', '.join([a.name for a in accounts]))
@@ -461,7 +461,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
@@ -56,7 +56,7 @@ REQUIREMENTS = ['pychannels==1.0.0']
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Channels platform."""
"""Set up the Channels platform."""
device = ChannelsPlayer(
config.get('name'),
config.get(CONF_HOST),
@@ -62,7 +62,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
device = VizioDevice(host, token, name, volume_step)
if device.validate_setup() is False:
_LOGGER.error("Failed to setup Vizio TV platform, "
_LOGGER.error("Failed to set up Vizio TV platform, "
"please check if host and API key are correct")
return
@@ -133,7 +133,7 @@ def setup_mysensors_platform(
async_add_devices=None):
"""Set up a MySensors platform."""
# Only act if called via MySensors by discovery event.
# Otherwise gateway is not setup.
# Otherwise gateway is not set up.
if not discovery_info:
return
if device_args is None:
+1 -1
View File
@@ -119,7 +119,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup Nest from a config entry."""
"""Set up Nest from a config entry."""
from nest import Nest
nest = Nest(access_token=entry.data['tokens']['access_token'])
+2 -2
View File
@@ -110,7 +110,7 @@ async def async_configure_sabnzbd(hass, config, use_ssl, name=DEFAULT_NAME,
async def async_setup(hass, config):
"""Setup the SABnzbd component."""
"""Set up the SABnzbd component."""
async def sabnzbd_discovered(service, info):
"""Handle service discovery."""
ssl = info.get('properties', {}).get('https', '0') == '1'
@@ -129,7 +129,7 @@ async def async_setup(hass, config):
@callback
def async_setup_sabnzbd(hass, sab_api, config, name):
"""Setup SABnzbd sensors and services."""
"""Set up SABnzbd sensors and services."""
sab_api_data = SabnzbdApiData(sab_api, name, config.get(CONF_SENSORS, {}))
if config.get(CONF_SENSORS):
+1 -1
View File
@@ -95,7 +95,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
+1 -1
View File
@@ -43,7 +43,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
@@ -1,5 +1,5 @@
"""
Counter for the days till a HTTPS (TLS) certificate will expire.
Counter for the days until an HTTPS (TLS) certificate will expire.
For more details about this sensor please refer to the documentation at
https://home-assistant.io/components/sensor.cert_expiry/
@@ -28,7 +28,7 @@ LAST_BILL_DAYS_BILLED = "last_bills_days_billed"
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup all Duke Energy meters."""
"""Set up all Duke Energy meters."""
from pydukeenergy.api import DukeEnergy, DukeEnergyException
try:
@@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
config[CONF_PASSWORD],
update_interval=120)
except DukeEnergyException:
_LOGGER.error("Failed to setup Duke Energy")
_LOGGER.error("Failed to set up Duke Energy")
return
add_devices([DukeEnergyMeter(meter) for meter in duke.get_meters()])
+1 -1
View File
@@ -151,7 +151,7 @@ class FinTsClient:
class FinTsAccount(Entity):
"""Sensor for a FinTS balanc account.
"""Sensor for a FinTS balance account.
A balance account contains an amount of money (=balance). The amount may
also be negative.
+2 -2
View File
@@ -31,7 +31,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the ihc sensor platform."""
"""Set up the IHC sensor platform."""
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
info = hass.data[IHC_DATA][IHC_INFO]
devices = []
@@ -77,6 +77,6 @@ class IHCSensor(IHCDevice, Entity):
return self._unit_of_measurement
def on_ihc_change(self, ihc_id, value):
"""Callback when ihc resource changes."""
"""Callback when IHC resource changes."""
self._state = value
self.schedule_update_ha_state()
+1 -1
View File
@@ -16,7 +16,7 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the melissa sensor platform."""
"""Set up the melissa sensor platform."""
sensors = []
api = hass.data[DATA_MELISSA]
devices = api.fetch_devices().values()
+1 -1
View File
@@ -164,7 +164,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
data = PyNUTData(host, port, alias, username, password)
if data.status is None:
_LOGGER.error("NUT Sensor has no data, unable to setup")
_LOGGER.error("NUT Sensor has no data, unable to set up")
raise PlatformNotReady
_LOGGER.debug('NUT Sensors Available: %s', data.status)
+1 -1
View File
@@ -47,7 +47,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the sensor platform."""
"""Set up the sensor platform."""
from Adafruit_SHT31 import SHT31
i2c_address = config.get(CONF_I2C_ADDRESS)
+1 -1
View File
@@ -77,7 +77,7 @@ class SigfoxAPI:
_LOGGER.error(
"Unable to login to Sigfox API, error code %s", str(
response.status_code))
raise ValueError('Sigfox component not setup')
raise ValueError('Sigfox component not set up')
return True
def get_device_types(self):
+1 -1
View File
@@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setting the platform in HASS and Case Information."""
"""Set up the platform in HASS and Case Information."""
uscis = UscisSensor(config['case_id'], config[CONF_FRIENDLY_NAME])
uscis.update()
if uscis.valid_case_id:
@@ -1,5 +1,5 @@
"""
Sensor support for Wirelss Sensor Tags platform.
Sensor support for Wireless Sensor Tags platform.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.wirelesstag/
@@ -58,7 +58,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the sensor platform."""
"""Set up the sensor platform."""
platform = hass.data.get(WIRELESSTAG_DOMAIN)
sensors = []
tags = platform.tags
@@ -6,10 +6,10 @@
},
"step": {
"confirm": {
"description": "Do you want to setup Sonos?",
"description": "Do you want to set up Sonos?",
"title": "Sonos"
}
},
"title": "Sonos"
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
"step": {
"confirm": {
"title": "Sonos",
"description": "Do you want to setup Sonos?"
"description": "Do you want to set up Sonos?"
}
},
"abort": {
+1 -1
View File
@@ -117,7 +117,7 @@ async def async_setup(hass, config):
async def async_setup_entry(hass, entry):
"""Setup a config entry."""
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
+2 -2
View File
@@ -26,7 +26,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the ihc switch platform."""
"""Set up the IHC switch platform."""
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
info = hass.data[IHC_DATA][IHC_INFO]
devices = []
@@ -70,6 +70,6 @@ class IHCSwitch(IHCDevice, SwitchDevice):
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
def on_ihc_change(self, ihc_id, value):
"""Callback when the ihc resource changes."""
"""Callback when the IHC resource changes."""
self._state = value
self.schedule_update_ha_state()
+1 -1
View File
@@ -43,7 +43,7 @@ CONFIG_SCHEMA = vol.Schema({
def setup(hass, base_config):
"""Setup waterfurnace platform."""
"""Set up waterfurnace platform."""
import waterfurnace.waterfurnace as wf
config = base_config.get(DOMAIN)
+1 -1
View File
@@ -87,7 +87,7 @@ class WirelessTagPlatform:
'content': content, 'disabled': False, 'nat': True})
def install_push_notifications(self, binary_sensors):
"""Setup local push notification from tag manager."""
"""Set up local push notification from tag manager."""
_LOGGER.info("Registering local push notifications.")
configs = []
+1 -1
View File
@@ -44,7 +44,7 @@ PLATFORM_SCHEMA = vol.Schema({
async def async_setup(hass, config):
"""Setup configured zones as well as home assistant zone if necessary."""
"""Set up configured zones as well as home assistant zone if necessary."""
hass.data[DOMAIN] = {}
entities = set()
zone_entries = configured_zones(hass)