Skip to content

Commit

Permalink
Grammar and spelling fixes (home-assistant#16065)
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored and fabaff committed Aug 19, 2018
1 parent 9e1fa7e commit dbd0763
Show file tree
Hide file tree
Showing 244 changed files with 453 additions and 453 deletions.
2 changes: 1 addition & 1 deletion homeassistant/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ async def async_stop_async_handler(_: Any) -> None:
hass.data[DATA_LOGGING] = err_log_path
else:
_LOGGER.error(
"Unable to setup error log %s (access denied)", err_log_path)
"Unable to set up error log %s (access denied)", err_log_path)


async def async_mount_local_lib_path(config_dir: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alarm_control_panel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alarm_control_panel/simplisafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/automation/__init__.py
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/binary_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/binary_sensor/hikvision.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -214,7 +214,7 @@ def update_tokens(time):


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)


Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/cast/.translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion homeassistant/components/cast/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/climate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/deconz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def async_add_device_callback(device_type, device):

@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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/ritassist.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, config, see):
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(),
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/homekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


async def async_setup(hass, config):
"""Setup the HomeKit component."""
"""Set up the HomeKit component."""
_LOGGER.debug('Begin setup HomeKit')

conf = config[DOMAIN]
Expand Down Expand Up @@ -196,7 +196,7 @@ def __init__(self, hass, name, port, ip_address, entity_filter,
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(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/http/cors.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,7 +17,7 @@

@callback
def setup_cors(app, origins):
"""Setup cors."""
"""Set up CORS."""
import aiohttp_cors

cors = aiohttp_cors.setup(app, defaults={
Expand All @@ -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:
Expand All @@ -55,7 +55,7 @@ def _allow_cors(route, config=None):
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)

Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/ihc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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]
Expand Down
14 changes: 7 additions & 7 deletions homeassistant/components/ihc/services.yaml
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion homeassistant/components/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ async def async_handle_light_on_service(service):


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)


Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/light/ihc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


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 = []
Expand Down Expand Up @@ -109,7 +109,7 @@ def turn_off(self, **kwargs) -> None:
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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/light/lw12wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


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.
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lock/bmw_connected_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


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]))
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/media_player/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/media_player/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


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),
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/media_player/vizio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mysensors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/nest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/sabnzbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -129,7 +129,7 @@ async def sabnzbd_discovered(service, info):

@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):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/scene/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def async_handle_scene_service(service):


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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/cert_expiry.py
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/sensor/duke_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@


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:
duke = DukeEnergy(config[CONF_USERNAME],
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()])
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/fints.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def detect_accounts(self):


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.
Expand Down
Loading

0 comments on commit dbd0763

Please sign in to comment.