From 55ee8959ba22011c63dbb3ab84391353e3e21555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> Date: Sat, 27 Jan 2018 21:58:27 +0200 Subject: [PATCH] Spelling fixes (#11940) --- CODEOWNERS | 2 +- homeassistant/components/__init__.py | 2 +- homeassistant/components/alexa/smart_home.py | 8 ++++---- homeassistant/components/binary_sensor/hive.py | 2 +- .../components/binary_sensor/insteon_plm.py | 2 +- .../components/binary_sensor/raincloud.py | 2 +- homeassistant/components/binary_sensor/wemo.py | 2 +- homeassistant/components/calendar/caldav.py | 2 +- homeassistant/components/calendar/todoist.py | 2 +- homeassistant/components/camera/__init__.py | 4 ++-- homeassistant/components/climate/demo.py | 2 +- homeassistant/components/climate/eq3btsmart.py | 2 +- homeassistant/components/climate/hive.py | 2 +- homeassistant/components/climate/mqtt.py | 4 ++-- homeassistant/components/climate/tado.py | 4 ++-- homeassistant/components/cover/zwave.py | 2 +- .../components/device_tracker/actiontec.py | 2 +- homeassistant/components/emoncms_history.py | 2 +- homeassistant/components/fan/xiaomi_miio.py | 2 +- homeassistant/components/frontend/__init__.py | 2 +- .../components/google_assistant/smart_home.py | 4 ++-- homeassistant/components/homematic/__init__.py | 2 +- homeassistant/components/homematic/services.yaml | 4 ++-- .../components/image_processing/__init__.py | 2 +- homeassistant/components/light/hive.py | 2 +- homeassistant/components/light/insteon_plm.py | 2 +- homeassistant/components/light/mochad.py | 2 +- homeassistant/components/lirc.py | 2 +- homeassistant/components/mailbox/__init__.py | 2 +- .../components/media_player/anthemav.py | 2 +- .../components/media_player/bluesound.py | 4 ++-- homeassistant/components/media_player/cmus.py | 2 +- homeassistant/components/media_player/denon.py | 2 +- .../components/media_player/monoprice.py | 2 +- .../components/media_player/squeezebox.py | 2 +- homeassistant/components/microsoft_face.py | 2 +- homeassistant/components/notify/apns.py | 4 ++-- homeassistant/components/rflink.py | 2 +- homeassistant/components/sensor/bme680.py | 2 +- homeassistant/components/sensor/dsmr.py | 4 ++-- .../components/sensor/eddystone_temperature.py | 4 ++-- homeassistant/components/sensor/eight_sleep.py | 6 +++--- homeassistant/components/sensor/gearbest.py | 2 +- homeassistant/components/sensor/hive.py | 2 +- homeassistant/components/sensor/raincloud.py | 2 +- homeassistant/components/sensor/tado.py | 2 +- homeassistant/components/sensor/waterfurnace.py | 2 +- .../components/switch/acer_projector.py | 2 +- homeassistant/components/switch/broadlink.py | 2 +- .../components/switch/digitalloggers.py | 2 +- homeassistant/components/switch/flux.py | 2 +- homeassistant/components/switch/hive.py | 2 +- homeassistant/components/switch/insteon_plm.py | 2 +- homeassistant/components/switch/raincloud.py | 2 +- homeassistant/components/switch/scsgate.py | 2 +- .../components/telegram_bot/services.yaml | 16 ++++++++-------- homeassistant/components/zwave/__init__.py | 2 +- homeassistant/components/zwave/services.yaml | 6 +++--- homeassistant/core.py | 4 ++-- homeassistant/helpers/entity.py | 4 ++-- homeassistant/helpers/event.py | 2 +- homeassistant/loader.py | 2 +- homeassistant/util/__init__.py | 2 +- homeassistant/util/logging.py | 2 +- tests/components/camera/test_init.py | 2 +- .../device_tracker/test_unifi_direct.py | 4 ++-- .../google_assistant/test_google_assistant.py | 2 +- tests/components/image_processing/test_init.py | 2 +- tests/components/light/test_litejet.py | 2 +- tests/components/media_player/test_sonos.py | 4 ++-- tests/components/media_player/test_yamaha.py | 2 +- tests/components/recorder/test_migrate.py | 2 +- tests/components/sensor/test_dsmr.py | 2 +- tests/components/test_dialogflow.py | 4 ++-- tests/components/tts/test_yandextts.py | 4 ++-- tests/helpers/test_entity_component.py | 4 ++-- tests/test_bootstrap.py | 2 +- tests/test_core.py | 2 +- tests/test_remote.py | 2 +- tests/util/test_yaml.py | 2 +- 80 files changed, 110 insertions(+), 110 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index d6b0385614a..6e088a84e5d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -41,7 +41,7 @@ homeassistant/components/*/zwave.py @home-assistant/z-wave homeassistant/components/hassio.py @home-assistant/hassio -# Indiviudal components +# Individual components homeassistant/components/alarm_control_panel/egardia.py @jeroenterheerdt homeassistant/components/camera/yi.py @bachya homeassistant/components/climate/ephember.py @ttroy50 diff --git a/homeassistant/components/__init__.py b/homeassistant/components/__init__.py index 6db147a5f59..a1c6811afe7 100644 --- a/homeassistant/components/__init__.py +++ b/homeassistant/components/__init__.py @@ -133,7 +133,7 @@ def async_setup(hass, config): # have been processed. If a service does not exist it causes a 10 # second delay while we're blocking waiting for a response. # But services can be registered on other HA instances that are - # listening to the bus too. So as a in between solution, we'll + # listening to the bus too. So as an in between solution, we'll # block only if the service is defined in the current HA instance. blocking = hass.services.has_service(domain, service.service) diff --git a/homeassistant/components/alexa/smart_home.py b/homeassistant/components/alexa/smart_home.py index 2fae0b323a0..a24583d8247 100644 --- a/homeassistant/components/alexa/smart_home.py +++ b/homeassistant/components/alexa/smart_home.py @@ -624,7 +624,7 @@ def async_api_set_brightness(hass, config, request, entity): @extract_entity @asyncio.coroutine def async_api_adjust_brightness(hass, config, request, entity): - """Process a adjust brightness request.""" + """Process an adjust brightness request.""" brightness_delta = int(request[API_PAYLOAD]['brightnessDelta']) # read current state @@ -812,7 +812,7 @@ def async_api_set_percentage(hass, config, request, entity): @extract_entity @asyncio.coroutine def async_api_adjust_percentage(hass, config, request, entity): - """Process a adjust percentage request.""" + """Process an adjust percentage request.""" percentage_delta = int(request[API_PAYLOAD]['percentageDelta']) service = None data = {ATTR_ENTITY_ID: entity.entity_id} @@ -873,7 +873,7 @@ def async_api_lock(hass, config, request, entity): @extract_entity @asyncio.coroutine def async_api_unlock(hass, config, request, entity): - """Process a unlock request.""" + """Process an unlock request.""" yield from hass.services.async_call(entity.domain, SERVICE_UNLOCK, { ATTR_ENTITY_ID: entity.entity_id }, blocking=False) @@ -904,7 +904,7 @@ def async_api_set_volume(hass, config, request, entity): @extract_entity @asyncio.coroutine def async_api_adjust_volume(hass, config, request, entity): - """Process a adjust volume request.""" + """Process an adjust volume request.""" volume_delta = int(request[API_PAYLOAD]['volume']) current_level = entity.attributes.get(media_player.ATTR_MEDIA_VOLUME_LEVEL) diff --git a/homeassistant/components/binary_sensor/hive.py b/homeassistant/components/binary_sensor/hive.py index 6223ebe50a1..2d4cbd8d070 100644 --- a/homeassistant/components/binary_sensor/hive.py +++ b/homeassistant/components/binary_sensor/hive.py @@ -59,5 +59,5 @@ class HiveBinarySensorEntity(BinarySensorDevice): self.node_device_type) def update(self): - """Update all Node data frome Hive.""" + """Update all Node data from Hive.""" self.session.core.update_data(self.node_id) diff --git a/homeassistant/components/binary_sensor/insteon_plm.py b/homeassistant/components/binary_sensor/insteon_plm.py index 0702ce8bb9e..1874be6ec41 100644 --- a/homeassistant/components/binary_sensor/insteon_plm.py +++ b/homeassistant/components/binary_sensor/insteon_plm.py @@ -83,5 +83,5 @@ class InsteonPLMBinarySensorDevice(BinarySensorDevice): @callback def async_binarysensor_update(self, message): """Receive notification from transport that new data exists.""" - _LOGGER.info("Received update calback from PLM for %s", self._address) + _LOGGER.info("Received update callback from PLM for %s", self._address) self._hass.async_add_job(self.async_update_ha_state()) diff --git a/homeassistant/components/binary_sensor/raincloud.py b/homeassistant/components/binary_sensor/raincloud.py index f75f7644c4e..288b46c2370 100644 --- a/homeassistant/components/binary_sensor/raincloud.py +++ b/homeassistant/components/binary_sensor/raincloud.py @@ -39,7 +39,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sensor_type)) else: - # create an sensor for each zone managed by faucet + # create a sensor for each zone managed by faucet for zone in raincloud.controller.faucet.zones: sensors.append(RainCloudBinarySensor(zone, sensor_type)) diff --git a/homeassistant/components/binary_sensor/wemo.py b/homeassistant/components/binary_sensor/wemo.py index 1ec9e703eab..857c0c40777 100644 --- a/homeassistant/components/binary_sensor/wemo.py +++ b/homeassistant/components/binary_sensor/wemo.py @@ -62,7 +62,7 @@ class WemoBinarySensor(BinarySensorDevice): @property def name(self): - """Return the name of the sevice if any.""" + """Return the name of the service if any.""" return self.wemo.name @property diff --git a/homeassistant/components/calendar/caldav.py b/homeassistant/components/calendar/caldav.py index 8b2401aa589..ba798ce7902 100644 --- a/homeassistant/components/calendar/caldav.py +++ b/homeassistant/components/calendar/caldav.py @@ -174,7 +174,7 @@ class WebDavCalendarData(object): @staticmethod def is_matching(vevent, search): - """Return if the event matches the filter critera.""" + """Return if the event matches the filter criteria.""" if search is None: return True diff --git a/homeassistant/components/calendar/todoist.py b/homeassistant/components/calendar/todoist.py index 81191e3025e..f1c80612f3b 100644 --- a/homeassistant/components/calendar/todoist.py +++ b/homeassistant/components/calendar/todoist.py @@ -411,7 +411,7 @@ class TodoistProjectData(object): The "best" event is determined by the following criteria: * A proposed event must not be completed - * A proposed event must have a end date (otherwise we go with + * A proposed event must have an end date (otherwise we go with the event at index 0, selected above) * A proposed event must be on the same day or earlier as our current event diff --git a/homeassistant/components/camera/__init__.py b/homeassistant/components/camera/__init__.py index 1bb88050b2f..a531d25841b 100644 --- a/homeassistant/components/camera/__init__.py +++ b/homeassistant/components/camera/__init__.py @@ -91,13 +91,13 @@ def async_snapshot(hass, filename, entity_id=None): @bind_hass @asyncio.coroutine def async_get_image(hass, entity_id, timeout=10): - """Fetch a image from a camera entity.""" + """Fetch an image from a camera entity.""" websession = async_get_clientsession(hass) state = hass.states.get(entity_id) if state is None: raise HomeAssistantError( - "No entity '{0}' for grab a image".format(entity_id)) + "No entity '{0}' for grab an image".format(entity_id)) url = "{0}{1}".format( hass.config.api.base_url, diff --git a/homeassistant/components/climate/demo.py b/homeassistant/components/climate/demo.py index c3ba523468f..357b1d56200 100644 --- a/homeassistant/components/climate/demo.py +++ b/homeassistant/components/climate/demo.py @@ -207,7 +207,7 @@ class DemoClimate(ClimateDevice): self.schedule_update_ha_state() def turn_aux_heat_on(self): - """Turn auxillary heater on.""" + """Turn auxiliary heater on.""" self._aux = True self.schedule_update_ha_state() diff --git a/homeassistant/components/climate/eq3btsmart.py b/homeassistant/components/climate/eq3btsmart.py index 9b3b7d650a9..9c712c632e6 100644 --- a/homeassistant/components/climate/eq3btsmart.py +++ b/homeassistant/components/climate/eq3btsmart.py @@ -55,7 +55,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): # pylint: disable=import-error class EQ3BTSmartThermostat(ClimateDevice): - """Representation of a eQ-3 Bluetooth Smart thermostat.""" + """Representation of an eQ-3 Bluetooth Smart thermostat.""" def __init__(self, _mac, _name): """Initialize the thermostat.""" diff --git a/homeassistant/components/climate/hive.py b/homeassistant/components/climate/hive.py index b8ac66d91b3..760ef131049 100644 --- a/homeassistant/components/climate/hive.py +++ b/homeassistant/components/climate/hive.py @@ -174,5 +174,5 @@ class HiveClimateEntity(ClimateDevice): entity.handle_update(self.data_updatesource) def update(self): - """Update all Node data frome Hive.""" + """Update all Node data from Hive.""" self.session.core.update_data(self.node_id) diff --git a/homeassistant/components/climate/mqtt.py b/homeassistant/components/climate/mqtt.py index 3656bf7b475..5929cec3b05 100644 --- a/homeassistant/components/climate/mqtt.py +++ b/homeassistant/components/climate/mqtt.py @@ -565,7 +565,7 @@ class MqttClimate(MqttAvailability, ClimateDevice): @asyncio.coroutine def async_turn_aux_heat_on(self): - """Turn auxillary heater on.""" + """Turn auxiliary heater on.""" if self._topic[CONF_AUX_COMMAND_TOPIC] is not None: mqtt.async_publish(self.hass, self._topic[CONF_AUX_COMMAND_TOPIC], self._payload_on, self._qos, self._retain) @@ -576,7 +576,7 @@ class MqttClimate(MqttAvailability, ClimateDevice): @asyncio.coroutine def async_turn_aux_heat_off(self): - """Turn auxillary heater off.""" + """Turn auxiliary heater off.""" if self._topic[CONF_AUX_COMMAND_TOPIC] is not None: mqtt.async_publish(self.hass, self._topic[CONF_AUX_COMMAND_TOPIC], self._payload_off, self._qos, self._retain) diff --git a/homeassistant/components/climate/tado.py b/homeassistant/components/climate/tado.py index 25492cb0895..5b20462c245 100644 --- a/homeassistant/components/climate/tado.py +++ b/homeassistant/components/climate/tado.py @@ -249,7 +249,7 @@ class TadoClimate(ClimateDevice): data = self._store.get_data(self._data_id) if data is None: - _LOGGER.debug("Recieved no data for zone %s", self.zone_name) + _LOGGER.debug("Received no data for zone %s", self.zone_name) return if 'sensorDataPoints' in data: @@ -317,7 +317,7 @@ class TadoClimate(ClimateDevice): fan_speed = setting_data['fanSpeed'] if self._device_is_active: - # If you set mode manualy to off, there will be an overlay + # If you set mode manually to off, there will be an overlay # and a termination, but we want to see the mode "OFF" self._overlay_mode = termination self._current_operation = termination diff --git a/homeassistant/components/cover/zwave.py b/homeassistant/components/cover/zwave.py index 3c038125616..15100957242 100644 --- a/homeassistant/components/cover/zwave.py +++ b/homeassistant/components/cover/zwave.py @@ -158,7 +158,7 @@ class ZwaveGarageDoorBarrier(ZwaveGarageDoorBase): @property def is_closing(self): - """Return true if cover is in an closing state.""" + """Return true if cover is in a closing state.""" return self._state == "Closing" @property diff --git a/homeassistant/components/device_tracker/actiontec.py b/homeassistant/components/device_tracker/actiontec.py index 64e1a60ad08..781e486a40e 100644 --- a/homeassistant/components/device_tracker/actiontec.py +++ b/homeassistant/components/device_tracker/actiontec.py @@ -42,7 +42,7 @@ Device = namedtuple('Device', ['mac', 'ip', 'last_update']) class ActiontecDeviceScanner(DeviceScanner): - """This class queries a an actiontec router for connected devices.""" + """This class queries an actiontec router for connected devices.""" def __init__(self, config): """Initialize the scanner.""" diff --git a/homeassistant/components/emoncms_history.py b/homeassistant/components/emoncms_history.py index 34d9fd0f458..6a92ab64044 100644 --- a/homeassistant/components/emoncms_history.py +++ b/homeassistant/components/emoncms_history.py @@ -59,7 +59,7 @@ def setup(hass, config): payload, fullurl, req.status_code) def update_emoncms(time): - """Send whitelisted entities states reguarly to Emoncms.""" + """Send whitelisted entities states regularly to Emoncms.""" payload_dict = {} for entity_id in whitelist: diff --git a/homeassistant/components/fan/xiaomi_miio.py b/homeassistant/components/fan/xiaomi_miio.py index 910e33627a6..97ac382031b 100644 --- a/homeassistant/components/fan/xiaomi_miio.py +++ b/homeassistant/components/fan/xiaomi_miio.py @@ -200,7 +200,7 @@ class XiaomiAirPurifier(FanEntity): @asyncio.coroutine def _try_command(self, mask_error, func, *args, **kwargs): - """Call a air purifier command handling error messages.""" + """Call an air purifier command handling error messages.""" from miio import DeviceException try: result = yield from self.hass.async_add_job( diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 8f5a18ff843..610a531a702 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -407,7 +407,7 @@ def async_setup_themes(hass, themes): @callback def set_theme(call): - """Set backend-prefered theme.""" + """Set backend-preferred theme.""" data = call.data name = data[CONF_NAME] if name == DEFAULT_THEME or name in hass.data[DATA_THEMES]: diff --git a/homeassistant/components/google_assistant/smart_home.py b/homeassistant/components/google_assistant/smart_home.py index d8e9f668c8e..ba56e7c3837 100644 --- a/homeassistant/components/google_assistant/smart_home.py +++ b/homeassistant/components/google_assistant/smart_home.py @@ -79,7 +79,7 @@ class SmartHomeError(Exception): """Log error code.""" super(SmartHomeError, self).__init__(msg) _LOGGER.error( - "An error has ocurred in Google SmartHome: %s." + "An error has occurred in Google SmartHome: %s." "Error code: %s", msg, code ) self.code = code @@ -96,7 +96,7 @@ class Config: def entity_to_device(entity: Entity, config: Config, units: UnitSystem): - """Convert a hass entity into an google actions device.""" + """Convert a hass entity into a google actions device.""" entity_config = config.entity_config.get(entity.entity_id, {}) google_domain = entity_config.get(CONF_TYPE) class_data = MAPPING_COMPONENT.get( diff --git a/homeassistant/components/homematic/__init__.py b/homeassistant/components/homematic/__init__.py index db2a43d8728..70054e54075 100644 --- a/homeassistant/components/homematic/__init__.py +++ b/homeassistant/components/homematic/__init__.py @@ -466,7 +466,7 @@ def _system_callback_handler(hass, config, src, *args): hass, discovery_type, addresses, interface) # When devices of this type are found - # they are setup in HASS and an discovery event is fired + # they are setup in HASS and a discovery event is fired if found_devices: discovery.load_platform(hass, component_name, DOMAIN, { ATTR_DISCOVER_DEVICES: found_devices diff --git a/homeassistant/components/homematic/services.yaml b/homeassistant/components/homematic/services.yaml index bf4d99af9e7..c2946b51842 100644 --- a/homeassistant/components/homematic/services.yaml +++ b/homeassistant/components/homematic/services.yaml @@ -13,7 +13,7 @@ virtualkey: description: Event to send i.e. PRESS_LONG, PRESS_SHORT. example: PRESS_LONG interface: - description: (Optional) for set a interface value. + description: (Optional) for set an interface value. example: Interfaces name from config set_variable_value: @@ -42,7 +42,7 @@ set_device_value: description: Event to send i.e. PRESS_LONG, PRESS_SHORT example: PRESS_LONG interface: - description: (Optional) for set a interface value + description: (Optional) for set an interface value example: Interfaces name from config value: description: New value diff --git a/homeassistant/components/image_processing/__init__.py b/homeassistant/components/image_processing/__init__.py index 646bfcf421f..2c2b8364823 100644 --- a/homeassistant/components/image_processing/__init__.py +++ b/homeassistant/components/image_processing/__init__.py @@ -60,7 +60,7 @@ SERVICE_SCAN_SCHEMA = vol.Schema({ @bind_hass def scan(hass, entity_id=None): - """Force process a image.""" + """Force process an image.""" data = {ATTR_ENTITY_ID: entity_id} if entity_id else None hass.services.call(DOMAIN, SERVICE_SCAN, data) diff --git a/homeassistant/components/light/hive.py b/homeassistant/components/light/hive.py index 8fafb88a7db..5ba162a20d2 100644 --- a/homeassistant/components/light/hive.py +++ b/homeassistant/components/light/hive.py @@ -137,5 +137,5 @@ class HiveDeviceLight(Light): return supported_features def update(self): - """Update all Node data frome Hive.""" + """Update all Node data from Hive.""" self.session.core.update_data(self.node_id) diff --git a/homeassistant/components/light/insteon_plm.py b/homeassistant/components/light/insteon_plm.py index 51de9f03df5..f0ef0ce1b7e 100644 --- a/homeassistant/components/light/insteon_plm.py +++ b/homeassistant/components/light/insteon_plm.py @@ -101,7 +101,7 @@ class InsteonPLMDimmerDevice(Light): @callback def async_light_update(self, message): """Receive notification from transport that new data exists.""" - _LOGGER.info("Received update calback from PLM for %s", self._address) + _LOGGER.info("Received update callback from PLM for %s", self._address) self._hass.async_add_job(self.async_update_ha_state()) @asyncio.coroutine diff --git a/homeassistant/components/light/mochad.py b/homeassistant/components/light/mochad.py index efc62b05434..576e244103f 100644 --- a/homeassistant/components/light/mochad.py +++ b/homeassistant/components/light/mochad.py @@ -62,7 +62,7 @@ class MochadLight(Light): @property def brightness(self): - """Return the birghtness of this light between 0..255.""" + """Return the brightness of this light between 0..255.""" return self._brightness def _get_device_status(self): diff --git a/homeassistant/components/lirc.py b/homeassistant/components/lirc.py index 8b9ad0209da..ea4df658ef6 100644 --- a/homeassistant/components/lirc.py +++ b/homeassistant/components/lirc.py @@ -1,5 +1,5 @@ """ -LIRC interface to receive signals from a infrared remote control. +LIRC interface to receive signals from an infrared remote control. For more details about this component, please refer to the documentation at https://home-assistant.io/components/lirc/ diff --git a/homeassistant/components/mailbox/__init__.py b/homeassistant/components/mailbox/__init__.py index a1e68555649..8ff3746889e 100644 --- a/homeassistant/components/mailbox/__init__.py +++ b/homeassistant/components/mailbox/__init__.py @@ -133,7 +133,7 @@ class MailboxEntity(Entity): class Mailbox(object): - """Represent an mailbox device.""" + """Represent a mailbox device.""" def __init__(self, hass, name): """Initialize mailbox object.""" diff --git a/homeassistant/components/media_player/anthemav.py b/homeassistant/components/media_player/anthemav.py index 293c6e51d52..474751c2574 100644 --- a/homeassistant/components/media_player/anthemav.py +++ b/homeassistant/components/media_player/anthemav.py @@ -49,7 +49,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): def async_anthemav_update_callback(message): """Receive notification from transport that new data exists.""" - _LOGGER.info("Received update calback from AVR: %s", message) + _LOGGER.info("Received update callback from AVR: %s", message) hass.async_add_job(device.async_update_ha_state()) avr = yield from anthemav.Connection.create( diff --git a/homeassistant/components/media_player/bluesound.py b/homeassistant/components/media_player/bluesound.py index ca6b152a37e..96323579822 100644 --- a/homeassistant/components/media_player/bluesound.py +++ b/homeassistant/components/media_player/bluesound.py @@ -150,10 +150,10 @@ class BluesoundPlayer(MediaPlayerDevice): self._port = DEFAULT_PORT @staticmethod - def _try_get_index(string, seach_string): + def _try_get_index(string, search_string): """Get the index.""" try: - return string.index(seach_string) + return string.index(search_string) except ValueError: return -1 diff --git a/homeassistant/components/media_player/cmus.py b/homeassistant/components/media_player/cmus.py index fe25422360c..bcbee5c4ff7 100644 --- a/homeassistant/components/media_player/cmus.py +++ b/homeassistant/components/media_player/cmus.py @@ -77,7 +77,7 @@ class CmusDevice(MediaPlayerDevice): """Get the latest data and update the state.""" status = self.cmus.get_status_dict() if not status: - _LOGGER.warning("Recieved no status from cmus") + _LOGGER.warning("Received no status from cmus") else: self.status = status diff --git a/homeassistant/components/media_player/denon.py b/homeassistant/components/media_player/denon.py index 572405baa6e..d85bd51e7fb 100644 --- a/homeassistant/components/media_player/denon.py +++ b/homeassistant/components/media_player/denon.py @@ -108,7 +108,7 @@ class DenonDevice(MediaPlayerDevice): if not line: break lines.append(line.decode('ASCII').strip()) - _LOGGER.debug("Recived: %s", line) + _LOGGER.debug("Received: %s", line) if all_lines: return lines diff --git a/homeassistant/components/media_player/monoprice.py b/homeassistant/components/media_player/monoprice.py index d26fce0ea88..44d19ac6860 100644 --- a/homeassistant/components/media_player/monoprice.py +++ b/homeassistant/components/media_player/monoprice.py @@ -103,7 +103,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class MonopriceZone(MediaPlayerDevice): - """Representation of a a Monoprice amplifier zone.""" + """Representation of a Monoprice amplifier zone.""" def __init__(self, monoprice, sources, zone_id, zone_name): """Initialize new zone.""" diff --git a/homeassistant/components/media_player/squeezebox.py b/homeassistant/components/media_player/squeezebox.py index 13f05cc59f7..82bd106af8d 100644 --- a/homeassistant/components/media_player/squeezebox.py +++ b/homeassistant/components/media_player/squeezebox.py @@ -473,7 +473,7 @@ class SqueezeBoxDevice(MediaPlayerDevice): return self.async_query('playlist', 'play', media_id) def _add_uri_to_playlist(self, media_id): - """Add a items to the existing playlist.""" + """Add an item to the existing playlist.""" return self.async_query('playlist', 'add', media_id) def async_set_shuffle(self, shuffle): diff --git a/homeassistant/components/microsoft_face.py b/homeassistant/components/microsoft_face.py index e61ed05ce10..5a0bf2af1c4 100644 --- a/homeassistant/components/microsoft_face.py +++ b/homeassistant/components/microsoft_face.py @@ -337,7 +337,7 @@ class MicrosoftFace(object): @asyncio.coroutine def call_api(self, method, function, data=None, binary=False, params=None): - """Make a api call.""" + """Make an api call.""" headers = {"Ocp-Apim-Subscription-Key": self._api_key} url = self._server_url.format(function) diff --git a/homeassistant/components/notify/apns.py b/homeassistant/components/notify/apns.py index 6ef758b7bb5..e7a727bc5e2 100644 --- a/homeassistant/components/notify/apns.py +++ b/homeassistant/components/notify/apns.py @@ -112,13 +112,13 @@ class ApnsDevice(object): self.device_disabled = True def __eq__(self, other): - """Return the comparision.""" + """Return the comparison.""" if isinstance(other, self.__class__): return self.push_id == other.push_id and self.name == other.name return NotImplemented def __ne__(self, other): - """Return the comparision.""" + """Return the comparison.""" return not self.__eq__(other) diff --git a/homeassistant/components/rflink.py b/homeassistant/components/rflink.py index 73922d56040..d97d4f38f02 100644 --- a/homeassistant/components/rflink.py +++ b/homeassistant/components/rflink.py @@ -390,7 +390,7 @@ class RflinkCommand(RflinkDevice): """Cancel queued signal repetition commands. For example when user changed state while repetitions are still - queued for broadcast. Or when a incoming Rflink command (remote + queued for broadcast. Or when an incoming Rflink command (remote switch) changes the state. """ # cancel any outstanding tasks from the previous state change diff --git a/homeassistant/components/sensor/bme680.py b/homeassistant/components/sensor/bme680.py index 09d8ec4659c..081dc6cdc6e 100644 --- a/homeassistant/components/sensor/bme680.py +++ b/homeassistant/components/sensor/bme680.py @@ -238,7 +238,7 @@ class BME680Handler: self._gas_sensor_running = True - # Pause to allow inital data read for device validation. + # Pause to allow initial data read for device validation. sleep(1) start_time = time() diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 5b20ac0f4d0..1c12799549c 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -93,8 +93,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): device.telegram = telegram hass.async_add_job(device.async_update_ha_state()) - # Creates a asyncio.Protocol factory for reading DSMR telegrams from serial - # and calls update_entities_telegram to update entities on arrival + # Creates an asyncio.Protocol factory for reading DSMR telegrams from + # serial and calls update_entities_telegram to update entities on arrival if config[CONF_HOST]: reader_factory = partial( create_tcp_dsmr_reader, config[CONF_HOST], config[CONF_PORT], diff --git a/homeassistant/components/sensor/eddystone_temperature.py b/homeassistant/components/sensor/eddystone_temperature.py index fe05da3ccdd..ef06458cd84 100644 --- a/homeassistant/components/sensor/eddystone_temperature.py +++ b/homeassistant/components/sensor/eddystone_temperature.py @@ -122,7 +122,7 @@ class EddystoneTemp(Entity): class Monitor(object): - """Continously scan for BLE advertisements.""" + """Continuously scan for BLE advertisements.""" def __init__(self, hass, devices, bt_device_id): """Construct interface object.""" @@ -150,7 +150,7 @@ class Monitor(object): self.scanning = False def start(self): - """Continously scan for BLE advertisements.""" + """Continuously scan for BLE advertisements.""" if not self.scanning: self.scanner.start() self.scanning = True diff --git a/homeassistant/components/sensor/eight_sleep.py b/homeassistant/components/sensor/eight_sleep.py index e6f4addf003..e0a42fdb6a8 100644 --- a/homeassistant/components/sensor/eight_sleep.py +++ b/homeassistant/components/sensor/eight_sleep.py @@ -65,7 +65,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): class EightHeatSensor(EightSleepHeatEntity): - """Representation of a eight sleep heat-based sensor.""" + """Representation of an eight sleep heat-based sensor.""" def __init__(self, name, eight, sensor): """Initialize the sensor.""" @@ -116,7 +116,7 @@ class EightHeatSensor(EightSleepHeatEntity): class EightUserSensor(EightSleepUserEntity): - """Representation of a eight sleep user-based sensor.""" + """Representation of an eight sleep user-based sensor.""" def __init__(self, name, eight, sensor, units): """Initialize the sensor.""" @@ -232,7 +232,7 @@ class EightUserSensor(EightSleepUserEntity): class EightRoomSensor(EightSleepUserEntity): - """Representation of a eight sleep room sensor.""" + """Representation of an eight sleep room sensor.""" def __init__(self, name, eight, sensor, units): """Initialize the sensor.""" diff --git a/homeassistant/components/sensor/gearbest.py b/homeassistant/components/sensor/gearbest.py index 2bc7e5b3b3a..aa1d2d9eff0 100644 --- a/homeassistant/components/sensor/gearbest.py +++ b/homeassistant/components/sensor/gearbest.py @@ -1,5 +1,5 @@ """ -Parse prices of a item from gearbest. +Parse prices of an item from gearbest. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.gearbest/ diff --git a/homeassistant/components/sensor/hive.py b/homeassistant/components/sensor/hive.py index af31c14789a..cae2eaf7437 100644 --- a/homeassistant/components/sensor/hive.py +++ b/homeassistant/components/sensor/hive.py @@ -48,5 +48,5 @@ class HiveSensorEntity(Entity): return self.session.sensor.hub_online_status(self.node_id) def update(self): - """Update all Node data frome Hive.""" + """Update all Node data from Hive.""" self.session.core.update_data(self.node_id) diff --git a/homeassistant/components/sensor/raincloud.py b/homeassistant/components/sensor/raincloud.py index d3b8b7207e3..c03aa0a2aec 100644 --- a/homeassistant/components/sensor/raincloud.py +++ b/homeassistant/components/sensor/raincloud.py @@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): RainCloudSensor(raincloud.controller.faucet, sensor_type)) else: - # create an sensor for each zone managed by a faucet + # create a sensor for each zone managed by a faucet for zone in raincloud.controller.faucet.zones: sensors.append(RainCloudSensor(zone, sensor_type)) diff --git a/homeassistant/components/sensor/tado.py b/homeassistant/components/sensor/tado.py index 8c7259ff800..7acdc1a20bd 100644 --- a/homeassistant/components/sensor/tado.py +++ b/homeassistant/components/sensor/tado.py @@ -147,7 +147,7 @@ class TadoSensor(Entity): data = self._store.get_data(self._data_id) if data is None: - _LOGGER.debug("Recieved no data for zone %s", self.zone_name) + _LOGGER.debug("Received no data for zone %s", self.zone_name) return unit = TEMP_CELSIUS diff --git a/homeassistant/components/sensor/waterfurnace.py b/homeassistant/components/sensor/waterfurnace.py index 7d8c71f8d51..24c45ec1ff3 100644 --- a/homeassistant/components/sensor/waterfurnace.py +++ b/homeassistant/components/sensor/waterfurnace.py @@ -19,7 +19,7 @@ from homeassistant.util import slugify class WFSensorConfig(object): """Water Furnace Sensor configuration.""" - def __init__(self, friendly_name, field, icon="mdi:guage", + def __init__(self, friendly_name, field, icon="mdi:gauge", unit_of_measurement=None): """Initialize configuration.""" self.friendly_name = friendly_name diff --git a/homeassistant/components/switch/acer_projector.py b/homeassistant/components/switch/acer_projector.py index 58361b2e8b2..d32c0610b66 100644 --- a/homeassistant/components/switch/acer_projector.py +++ b/homeassistant/components/switch/acer_projector.py @@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class AcerSwitch(SwitchDevice): - """Represents an Acer Projector as an switch.""" + """Represents an Acer Projector as a switch.""" def __init__(self, serial_port, name, timeout, write_timeout, **kwargs): """Init of the Acer projector.""" diff --git a/homeassistant/components/switch/broadlink.py b/homeassistant/components/switch/broadlink.py index 5841642cc00..8353b4bf8ad 100644 --- a/homeassistant/components/switch/broadlink.py +++ b/homeassistant/components/switch/broadlink.py @@ -100,7 +100,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): packet = yield from hass.async_add_job( broadlink_device.check_data) if packet: - log_msg = "Recieved packet is: {}".\ + log_msg = "Received packet is: {}".\ format(b64encode(packet).decode('utf8')) _LOGGER.info(log_msg) hass.components.persistent_notification.async_create( diff --git a/homeassistant/components/switch/digitalloggers.py b/homeassistant/components/switch/digitalloggers.py index 0625a42f765..f3af70c6222 100644 --- a/homeassistant/components/switch/digitalloggers.py +++ b/homeassistant/components/switch/digitalloggers.py @@ -73,7 +73,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class DINRelay(SwitchDevice): - """Representation of a individual DIN III relay port.""" + """Representation of an individual DIN III relay port.""" def __init__(self, controller_name, parent_device, outlet): """Initialize the DIN III Relay switch.""" diff --git a/homeassistant/components/switch/flux.py b/homeassistant/components/switch/flux.py index ff432f2efc8..7e3566f17b0 100644 --- a/homeassistant/components/switch/flux.py +++ b/homeassistant/components/switch/flux.py @@ -210,7 +210,7 @@ class FluxSwitch(SwitchDevice): else: temp = self._start_colortemp + temp_offset else: - # Nightime + # Night time time_state = 'night' if now < stop_time: diff --git a/homeassistant/components/switch/hive.py b/homeassistant/components/switch/hive.py index 97d4320280d..67ebe95ba8e 100644 --- a/homeassistant/components/switch/hive.py +++ b/homeassistant/components/switch/hive.py @@ -65,5 +65,5 @@ class HiveDevicePlug(SwitchDevice): entity.handle_update(self.data_updatesource) def update(self): - """Update all Node data frome Hive.""" + """Update all Node data from Hive.""" self.session.core.update_data(self.node_id) diff --git a/homeassistant/components/switch/insteon_plm.py b/homeassistant/components/switch/insteon_plm.py index ed7d0ffc479..0b584e14b8d 100644 --- a/homeassistant/components/switch/insteon_plm.py +++ b/homeassistant/components/switch/insteon_plm.py @@ -83,7 +83,7 @@ class InsteonPLMSwitchDevice(SwitchDevice): @callback def async_switch_update(self, message): """Receive notification from transport that new data exists.""" - _LOGGER.info('Received update calback from PLM for %s', self._address) + _LOGGER.info('Received update callback from PLM for %s', self._address) self._hass.async_add_job(self.async_update_ha_state()) @asyncio.coroutine diff --git a/homeassistant/components/switch/raincloud.py b/homeassistant/components/switch/raincloud.py index f373a6aad84..a18d6544acc 100644 --- a/homeassistant/components/switch/raincloud.py +++ b/homeassistant/components/switch/raincloud.py @@ -35,7 +35,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sensors = [] for sensor_type in config.get(CONF_MONITORED_CONDITIONS): - # create an sensor for each zone managed by faucet + # create a sensor for each zone managed by faucet for zone in raincloud.controller.faucet.zones: sensors.append( RainCloudSwitch(default_watering_timer, diff --git a/homeassistant/components/switch/scsgate.py b/homeassistant/components/switch/scsgate.py index dfcf1816b7b..8b2734612de 100644 --- a/homeassistant/components/switch/scsgate.py +++ b/homeassistant/components/switch/scsgate.py @@ -155,7 +155,7 @@ class SCSGateSwitch(SwitchDevice): class SCSGateScenarioSwitch(object): """Provides a SCSGate scenario switch. - This switch is always in a 'off" state, when toggled it's used to trigger + This switch is always in an 'off" state, when toggled it's used to trigger events. """ diff --git a/homeassistant/components/telegram_bot/services.yaml b/homeassistant/components/telegram_bot/services.yaml index dc864c9f61a..4c144fe42db 100644 --- a/homeassistant/components/telegram_bot/services.yaml +++ b/homeassistant/components/telegram_bot/services.yaml @@ -25,7 +25,7 @@ send_message: description: List of rows of commands, comma-separated, to make a custom keyboard. example: '["/command1, /command2", "/command3"]' inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or ["Text button1:/button1, Text button2:/button2", "Text button3:/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' send_photo: @@ -56,7 +56,7 @@ send_photo: description: List of rows of commands, comma-separated, to make a custom keyboard. example: '["/command1, /command2", "/command3"]' inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' send_video: @@ -87,7 +87,7 @@ send_video: description: List of rows of commands, comma-separated, to make a custom keyboard. example: '["/command1, /command2", "/command3"]' inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' send_document: @@ -118,7 +118,7 @@ send_document: description: List of rows of commands, comma-separated, to make a custom keyboard. example: '["/command1, /command2", "/command3"]' inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' send_location: @@ -140,7 +140,7 @@ send_location: description: List of rows of commands, comma-separated, to make a custom keyboard. example: '["/command1, /command2", "/command3"]' inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' edit_message: @@ -165,7 +165,7 @@ edit_message: description: Disables link previews for links in the message. example: true inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' edit_caption: @@ -181,7 +181,7 @@ edit_caption: description: Message body of the notification. example: The garage door has been open for 10 minutes. inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' edit_replymarkup: @@ -194,7 +194,7 @@ edit_replymarkup: description: The chat_id where to edit the reply_markup. example: 12345 inline_keyboard: - description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data. + description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]' answer_callback_query: diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 9b80581b85e..abfd353e1f4 100644 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -219,7 +219,7 @@ def get_config_value(node, value_index, tries=5): and value.index == value_index): return value.data except RuntimeError: - # If we get an runtime error the dict has changed while + # If we get a runtime error the dict has changed while # we was looking for a value, just do it again return None if tries <= 0 else get_config_value( node, value_index, tries=tries - 1) diff --git a/homeassistant/components/zwave/services.yaml b/homeassistant/components/zwave/services.yaml index ba8e177c9f7..61855143d59 100644 --- a/homeassistant/components/zwave/services.yaml +++ b/homeassistant/components/zwave/services.yaml @@ -4,7 +4,7 @@ change_association: description: Change an association in the Z-Wave network. fields: association: - description: Specify add or remove assosication + description: Specify add or remove association example: add node_id: description: Node id of the node to set association for. @@ -30,14 +30,14 @@ heal_network: description: Start a Z-Wave network heal. This might take a while and will slow down the Z-Wave network greatly while it is being processed. Refer to OZW.log for progress. fields: return_routes: - description: Wheter or not to update the return routes from the nodes to the controller. Defaults to False. + description: Whether or not to update the return routes from the nodes to the controller. Defaults to False. example: True heal_node: description: Start a Z-Wave node heal. Refer to OZW.log for progress. fields: return_routes: - description: Wheter or not to update the return routes from the node to the controller. Defaults to False. + description: Whether or not to update the return routes from the node to the controller. Defaults to False. example: True remove_node: diff --git a/homeassistant/core.py b/homeassistant/core.py index 18cf40d3854..b1cf9c51efd 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -66,7 +66,7 @@ def valid_entity_id(entity_id: str) -> bool: def valid_state(state: str) -> bool: - """Test if an state is valid.""" + """Test if a state is valid.""" return len(state) < 256 @@ -777,7 +777,7 @@ class ServiceCall(object): self.call_id = call_id def __repr__(self): - """Return the represenation of the service.""" + """Return the representation of the service.""" if self.data: return "<ServiceCall {}.{}: {}>".format( self.domain, self.service, util.repr_helper(self.data)) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index e3816fdaa6f..5b5c674c32b 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -268,7 +268,7 @@ class Entity(object): self.entity_id, state, attr, self.force_update) def schedule_update_ha_state(self, force_refresh=False): - """Schedule a update ha state change task. + """Schedule an update ha state change task. That avoid executor dead looks. """ @@ -276,7 +276,7 @@ class Entity(object): @callback def async_schedule_update_ha_state(self, force_refresh=False): - """Schedule a update ha state change task.""" + """Schedule an update ha state change task.""" self.hass.async_add_job(self.async_update_ha_state(force_refresh)) @asyncio.coroutine diff --git a/homeassistant/helpers/event.py b/homeassistant/helpers/event.py index 6cd1916d4c2..e74881e6e89 100644 --- a/homeassistant/helpers/event.py +++ b/homeassistant/helpers/event.py @@ -119,7 +119,7 @@ track_template = threaded_listener_factory(async_track_template) @bind_hass def async_track_same_state(hass, period, action, async_check_same_func, entity_ids=MATCH_ALL): - """Track the state of entities for a period and run a action. + """Track the state of entities for a period and run an action. If async_check_func is None it use the state of orig_value. Without entity_ids we track all state changes. diff --git a/homeassistant/loader.py b/homeassistant/loader.py index ac20f94d243..4b9eec3d540 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -148,7 +148,7 @@ def get_component(comp_name) -> Optional[ModuleType]: # a namespace. We do not care about namespaces. # This prevents that when only # custom_components/switch/some_platform.py exists, - # the import custom_components.switch would succeeed. + # the import custom_components.switch would succeed. if module.__spec__.origin == 'namespace': continue diff --git a/homeassistant/util/__init__.py b/homeassistant/util/__init__.py index cb3ebeb7ee6..c4fea2846c5 100644 --- a/homeassistant/util/__init__.py +++ b/homeassistant/util/__init__.py @@ -227,7 +227,7 @@ class OrderedSet(MutableSet): return '%s(%r)' % (self.__class__.__name__, list(self)) def __eq__(self, other): - """Return the comparision.""" + """Return the comparison.""" if isinstance(other, OrderedSet): return len(self) == len(other) and list(self) == list(other) return set(self) == set(other) diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 7daaf937975..8a15c4f6320 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -23,7 +23,7 @@ class HideSensitiveDataFilter(logging.Filter): # pylint: disable=invalid-name class AsyncHandler(object): - """Logging handler wrapper to add a async layer.""" + """Logging handler wrapper to add an async layer.""" def __init__(self, loop, handler): """Initialize async logging handler wrapper.""" diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index 70e95dd7b93..87612da9faa 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -83,7 +83,7 @@ class TestGetImage(object): @patch('homeassistant.components.camera.demo.DemoCamera.camera_image', autospec=True, return_value=b'Test') def test_get_image_from_camera(self, mock_camera): - """Grab a image from camera entity.""" + """Grab an image from camera entity.""" self.hass.start() image = run_coroutine_threadsafe(camera.async_get_image( diff --git a/tests/components/device_tracker/test_unifi_direct.py b/tests/components/device_tracker/test_unifi_direct.py index b378118141a..8bc3a60146c 100644 --- a/tests/components/device_tracker/test_unifi_direct.py +++ b/tests/components/device_tracker/test_unifi_direct.py @@ -139,12 +139,12 @@ class TestComponentsDeviceTrackerUnifiDirect(unittest.TestCase): devices = scanner._get_update() # pylint: disable=protected-access self.assertTrue(devices is None) - def test_good_reponse_parses(self): + def test_good_response_parses(self): """Test that the response form the AP parses to JSON correctly.""" response = _response_to_json(load_fixture('unifi_direct.txt')) self.assertTrue(response != {}) - def test_bad_reponse_returns_none(self): + def test_bad_response_returns_none(self): """Test that a bad response form the AP parses to JSON correctly.""" self.assertTrue(_response_to_json("{(}") == {}) diff --git a/tests/components/google_assistant/test_google_assistant.py b/tests/components/google_assistant/test_google_assistant.py index 0d87b491229..9fc35bc17b1 100644 --- a/tests/components/google_assistant/test_google_assistant.py +++ b/tests/components/google_assistant/test_google_assistant.py @@ -304,7 +304,7 @@ def test_query_climate_request_f(hass_fixture, assistant_client): @asyncio.coroutine def test_execute_request(hass_fixture, assistant_client): - """Test a execute request.""" + """Test an execute request.""" reqid = '5711642932632160985' data = { 'requestId': diff --git a/tests/components/image_processing/test_init.py b/tests/components/image_processing/test_init.py index 0594c436abd..b0bb7d77e3c 100644 --- a/tests/components/image_processing/test_init.py +++ b/tests/components/image_processing/test_init.py @@ -82,7 +82,7 @@ class TestImageProcessing(object): @patch('homeassistant.components.camera.demo.DemoCamera.camera_image', autospec=True, return_value=b'Test') def test_get_image_from_camera(self, mock_camera): - """Grab a image from camera entity.""" + """Grab an image from camera entity.""" self.hass.start() ip.scan(self.hass, entity_id='image_processing.test') diff --git a/tests/components/light/test_litejet.py b/tests/components/light/test_litejet.py index 001c419066f..dd4b4b4a56e 100644 --- a/tests/components/light/test_litejet.py +++ b/tests/components/light/test_litejet.py @@ -156,7 +156,7 @@ class TestLiteJetLight(unittest.TestCase): # (Requesting the level is not strictly needed with a deactivated # event but the implementation happens to do it. This could be - # changed to a assert_not_called in the future.) + # changed to an assert_not_called in the future.) self.mock_lj.get_load_level.assert_called_with( ENTITY_OTHER_LIGHT_NUMBER) diff --git a/tests/components/media_player/test_sonos.py b/tests/components/media_player/test_sonos.py index 815204e718a..d3ebc67931f 100644 --- a/tests/components/media_player/test_sonos.py +++ b/tests/components/media_player/test_sonos.py @@ -152,7 +152,7 @@ class TestSonosMediaPlayer(unittest.TestCase): @mock.patch('socket.create_connection', side_effect=socket.error()) @mock.patch('soco.discover') def test_ensure_setup_config_interface_addr(self, discover_mock, *args): - """Test a interface address config'd by the HASS config file.""" + """Test an interface address config'd by the HASS config file.""" discover_mock.return_value = {SoCoMock('192.0.2.1')} config = { @@ -172,7 +172,7 @@ class TestSonosMediaPlayer(unittest.TestCase): @mock.patch('soco.discover') def test_ensure_setup_config_advertise_addr(self, discover_mock, *args): - """Test a advertise address config'd by the HASS config file.""" + """Test an advertise address config'd by the HASS config file.""" discover_mock.return_value = {SoCoMock('192.0.2.1')} config = { diff --git a/tests/components/media_player/test_yamaha.py b/tests/components/media_player/test_yamaha.py index 3322f6021e7..e17241485db 100644 --- a/tests/components/media_player/test_yamaha.py +++ b/tests/components/media_player/test_yamaha.py @@ -44,7 +44,7 @@ class TestYamahaMediaPlayer(unittest.TestCase): self.hass.stop() def enable_output(self, port, enabled): - """Enable ouput on a specific port.""" + """Enable output on a specific port.""" data = { 'entity_id': 'media_player.yamaha_receiver_main_zone', 'port': port, diff --git a/tests/components/recorder/test_migrate.py b/tests/components/recorder/test_migrate.py index 7c558f2803d..5ac9b3adb81 100644 --- a/tests/components/recorder/test_migrate.py +++ b/tests/components/recorder/test_migrate.py @@ -25,7 +25,7 @@ def create_engine_test(*args, **kwargs): @asyncio.coroutine def test_schema_update_calls(hass): - """Test that schema migrations occurr in correct order.""" + """Test that schema migrations occur in correct order.""" with patch('sqlalchemy.create_engine', new=create_engine_test), \ patch('homeassistant.components.recorder.migration._apply_update') as \ update: diff --git a/tests/components/sensor/test_dsmr.py b/tests/components/sensor/test_dsmr.py index 86e637ab1ae..e5fca461a23 100644 --- a/tests/components/sensor/test_dsmr.py +++ b/tests/components/sensor/test_dsmr.py @@ -110,7 +110,7 @@ def test_derivative(): yield from entity.async_update() assert entity.state == STATE_UNKNOWN, \ - 'state after first update shoudl still be unknown' + 'state after first update should still be unknown' entity.telegram = { '1.0.0': MBusObject([ diff --git a/tests/components/test_dialogflow.py b/tests/components/test_dialogflow.py index a52c841e0cc..0acf0833543 100644 --- a/tests/components/test_dialogflow.py +++ b/tests/components/test_dialogflow.py @@ -435,7 +435,7 @@ class TestDialogflow(unittest.TestCase): self.assertEqual("virgo", call.data.get("hello")) def test_intent_with_no_action(self): - """Test a intent with no defined action.""" + """Test an intent with no defined action.""" data = { "id": REQUEST_ID, "timestamp": REQUEST_TIMESTAMP, @@ -480,7 +480,7 @@ class TestDialogflow(unittest.TestCase): "You have not defined an action in your Dialogflow intent.", text) def test_intent_with_unknown_action(self): - """Test a intent with an action not defined in the conf.""" + """Test an intent with an action not defined in the conf.""" data = { "id": REQUEST_ID, "timestamp": REQUEST_TIMESTAMP, diff --git a/tests/components/tts/test_yandextts.py b/tests/components/tts/test_yandextts.py index e08229631cf..5b4ef4dcf53 100644 --- a/tests/components/tts/test_yandextts.py +++ b/tests/components/tts/test_yandextts.py @@ -224,7 +224,7 @@ class TestTTSYandexPlatform(object): assert len(calls) == 0 - def test_service_say_specifed_speaker(self, aioclient_mock): + def test_service_say_specified_speaker(self, aioclient_mock): """Test service call say.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) @@ -259,7 +259,7 @@ class TestTTSYandexPlatform(object): assert len(aioclient_mock.mock_calls) == 1 assert len(calls) == 1 - def test_service_say_specifed_emotion(self, aioclient_mock): + def test_service_say_specified_emotion(self, aioclient_mock): """Test service call say.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) diff --git a/tests/helpers/test_entity_component.py b/tests/helpers/test_entity_component.py index 3109ea776bc..40a0f8be3b2 100644 --- a/tests/helpers/test_entity_component.py +++ b/tests/helpers/test_entity_component.py @@ -130,7 +130,7 @@ class TestHelpersEntityComponent(unittest.TestCase): assert poll_ent.async_update.called def test_polling_updates_entities_with_exception(self): - """Test the updated entities that not break with a exception.""" + """Test the updated entities that not break with an exception.""" component = EntityComponent( _LOGGER, DOMAIN, self.hass, timedelta(seconds=20)) @@ -663,7 +663,7 @@ def test_raise_error_on_update(hass): entity2 = EntityTest(name='test_2') def _raise(): - """Helper to raise a exception.""" + """Helper to raise an exception.""" raise AssertionError entity1.update = _raise diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 9047f26b2d1..c109ae30aad 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -17,7 +17,7 @@ VERSION_PATH = os.path.join(get_test_config_dir(), config_util.VERSION_FILE) _LOGGER = logging.getLogger(__name__) -# prevent .HA_VERISON file from being written +# prevent .HA_VERSION file from being written @patch( 'homeassistant.bootstrap.conf_util.process_ha_config_upgrade', Mock()) @patch('homeassistant.util.location.detect_location_info', diff --git a/tests/test_core.py b/tests/test_core.py index ea952a7c073..90a72a48a10 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -172,7 +172,7 @@ class TestHomeAssistant(unittest.TestCase): assert len(call_count) == 2 def test_async_add_job_pending_tasks_executor(self): - """Run a executor in pending tasks.""" + """Run an executor in pending tasks.""" call_count = [] def test_executor(): diff --git a/tests/test_remote.py b/tests/test_remote.py index 41011794914..9aa730d6eb6 100644 --- a/tests/test_remote.py +++ b/tests/test_remote.py @@ -28,7 +28,7 @@ def _url(path=''): # pylint: disable=invalid-name def setUpModule(): - """Initalization of a Home Assistant server instance.""" + """Initialization of a Home Assistant server instance.""" global hass, master_api hass = get_test_home_assistant() diff --git a/tests/util/test_yaml.py b/tests/util/test_yaml.py index 38b957ad102..734f4b548b9 100644 --- a/tests/util/test_yaml.py +++ b/tests/util/test_yaml.py @@ -48,7 +48,7 @@ class TestYaml(unittest.TestCase): load_yaml_config_file(YAML_CONFIG_FILE) def test_no_key(self): - """Test item without an key.""" + """Test item without a key.""" files = {YAML_CONFIG_FILE: 'a: a\nnokeyhere'} with self.assertRaises(HomeAssistantError), \ patch_yaml_files(files): -- GitLab