diff --git a/homeassistant/components/alarm_control_panel/concord232.py b/homeassistant/components/alarm_control_panel/concord232.py index df815424ee9e..291d4bc80b59 100755 --- a/homeassistant/components/alarm_control_panel/concord232.py +++ b/homeassistant/components/alarm_control_panel/concord232.py @@ -107,7 +107,7 @@ class Concord232Alarm(alarm.AlarmControlPanel): newstate = STATE_ALARM_ARMED_AWAY if not newstate == self._state: - _LOGGER.info("State Chnage from %s to %s", self._state, newstate) + _LOGGER.info("State Change from %s to %s", self._state, newstate) self._state = newstate return self._state diff --git a/homeassistant/components/alexa/smart_home.py b/homeassistant/components/alexa/smart_home.py index aa4b1cbec70e..ae1ecb87f60d 100644 --- a/homeassistant/components/alexa/smart_home.py +++ b/homeassistant/components/alexa/smart_home.py @@ -43,7 +43,7 @@ def mapping_api_function(name): @asyncio.coroutine def async_handle_message(hass, message): - """Handle incomming API messages.""" + """Handle incoming API messages.""" assert int(message[ATTR_HEADER][ATTR_PAYLOAD_VERSION]) == 2 # Do we support this API request? @@ -57,7 +57,7 @@ def async_handle_message(hass, message): def api_message(name, namespace, payload=None): - """Create a API formated response message. + """Create a API formatted response message. Async friendly. """ @@ -74,7 +74,7 @@ def api_message(name, namespace, payload=None): def api_error(request, exc='DriverInternalError'): - """Create a API formated error response. + """Create a API formatted error response. Async friendly. """ @@ -83,7 +83,7 @@ def api_error(request, exc='DriverInternalError'): @asyncio.coroutine def async_api_discovery(hass, request): - """Create a API formated discovery response. + """Create a API formatted discovery response. Async friendly. """ diff --git a/homeassistant/components/binary_sensor/insteon_plm.py b/homeassistant/components/binary_sensor/insteon_plm.py index 448ceae8636c..0702ce8bb9e0 100644 --- a/homeassistant/components/binary_sensor/insteon_plm.py +++ b/homeassistant/components/binary_sensor/insteon_plm.py @@ -55,12 +55,12 @@ class InsteonPLMBinarySensorDevice(BinarySensorDevice): @property def address(self): - """Return the the address of the node.""" + """Return the address of the node.""" return self._address @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self._name @property diff --git a/homeassistant/components/calendar/todoist.py b/homeassistant/components/calendar/todoist.py index ae9a1c9afa85..eb9f0a2677e2 100644 --- a/homeassistant/components/calendar/todoist.py +++ b/homeassistant/components/calendar/todoist.py @@ -277,7 +277,7 @@ class TodoistProjectData(object): """ Class used by the Task Device service object to hold all Todoist Tasks. - This is analagous to the GoogleCalendarData found in the Google Calendar + This is analogous to the GoogleCalendarData found in the Google Calendar component. Takes an object with a 'name' field and optionally an 'id' field (either diff --git a/homeassistant/components/camera/amcrest.py b/homeassistant/components/camera/amcrest.py index 51b8ff13906f..aba1bb08c936 100644 --- a/homeassistant/components/camera/amcrest.py +++ b/homeassistant/components/camera/amcrest.py @@ -62,7 +62,7 @@ class AmcrestCam(Camera): self._token = self._auth = authentication def camera_image(self): - """Return a still image reponse from the camera.""" + """Return a still image response from the camera.""" # Send the request to snap a picture and return raw jpg data response = self._camera.snapshot(channel=self._resolution) return response.data diff --git a/homeassistant/components/camera/blink.py b/homeassistant/components/camera/blink.py index bca4fafec4fa..4b708817cfd9 100644 --- a/homeassistant/components/camera/blink.py +++ b/homeassistant/components/camera/blink.py @@ -76,6 +76,6 @@ class BlinkCamera(Camera): return self.data.camera_thumbs[self._name] def camera_image(self): - """Return a still image reponse from the camera.""" + """Return a still image response from the camera.""" self.request_image() return self.response.content diff --git a/homeassistant/components/camera/foscam.py b/homeassistant/components/camera/foscam.py index 3f2761e332a5..3cc391eae33f 100644 --- a/homeassistant/components/camera/foscam.py +++ b/homeassistant/components/camera/foscam.py @@ -59,7 +59,7 @@ class FoscamCam(Camera): self._password, verbose=False) def camera_image(self): - """Return a still image reponse from the camera.""" + """Return a still image response from the camera.""" # Send the request to snap a picture and return raw jpg data # Handle exception if host is not reachable or url failed result, response = self._foscam_session.snap_picture_2() diff --git a/homeassistant/components/climate/__init__.py b/homeassistant/components/climate/__init__.py index 1f9193012549..8ccc3b2d6631 100644 --- a/homeassistant/components/climate/__init__.py +++ b/homeassistant/components/climate/__init__.py @@ -147,7 +147,7 @@ def set_hold_mode(hass, hold_mode, entity_id=None): @bind_hass def set_aux_heat(hass, aux_heat, entity_id=None): - """Turn all or specified climate devices auxillary heater on.""" + """Turn all or specified climate devices auxiliary heater on.""" data = { ATTR_AUX_HEAT: aux_heat } @@ -661,22 +661,22 @@ class ClimateDevice(Entity): return self.hass.async_add_job(self.set_hold_mode, hold_mode) def turn_aux_heat_on(self): - """Turn auxillary heater on.""" + """Turn auxiliary heater on.""" raise NotImplementedError() def async_turn_aux_heat_on(self): - """Turn auxillary heater on. + """Turn auxiliary heater on. This method must be run in the event loop and returns a coroutine. """ return self.hass.async_add_job(self.turn_aux_heat_on) def turn_aux_heat_off(self): - """Turn auxillary heater off.""" + """Turn auxiliary heater off.""" raise NotImplementedError() def async_turn_aux_heat_off(self): - """Turn auxillary heater off. + """Turn auxiliary heater off. This method must be run in the event loop and returns a coroutine. """ diff --git a/homeassistant/components/climate/demo.py b/homeassistant/components/climate/demo.py index 24b40af7eb1f..0880cb3db8f7 100644 --- a/homeassistant/components/climate/demo.py +++ b/homeassistant/components/climate/demo.py @@ -183,11 +183,11 @@ class DemoClimate(ClimateDevice): self.schedule_update_ha_state() def turn_aux_heat_on(self): - """Turn away auxillary heater on.""" + """Turn away auxiliary heater on.""" self._aux = True self.schedule_update_ha_state() def turn_aux_heat_off(self): - """Turn auxillary heater off.""" + """Turn auxiliary heater off.""" self._aux = False self.schedule_update_ha_state() diff --git a/homeassistant/components/climate/services.yaml b/homeassistant/components/climate/services.yaml index 4aebb1c85c99..92d821ebbaf0 100644 --- a/homeassistant/components/climate/services.yaml +++ b/homeassistant/components/climate/services.yaml @@ -1,5 +1,5 @@ set_aux_heat: - description: Turn auxillary heater on/off for climate device + description: Turn auxiliary heater on/off for climate device fields: entity_id: diff --git a/homeassistant/components/climate/wink.py b/homeassistant/components/climate/wink.py index f52340dc6273..90b101e1b7b2 100644 --- a/homeassistant/components/climate/wink.py +++ b/homeassistant/components/climate/wink.py @@ -281,11 +281,11 @@ class WinkThermostat(WinkDevice, ClimateDevice): self.wink.set_fan_mode(fan.lower()) def turn_aux_heat_on(self): - """Turn auxillary heater on.""" + """Turn auxiliary heater on.""" self.set_operation_mode(STATE_AUX) def turn_aux_heat_off(self): - """Turn auxillary heater off.""" + """Turn auxiliary heater off.""" self.set_operation_mode(STATE_AUTO) @property diff --git a/homeassistant/components/device_tracker/icloud.py b/homeassistant/components/device_tracker/icloud.py index e670287dd879..472b48fef6e4 100644 --- a/homeassistant/components/device_tracker/icloud.py +++ b/homeassistant/components/device_tracker/icloud.py @@ -248,7 +248,7 @@ class Icloud(DeviceScanner): self._trusted_device, self._verification_code): raise PyiCloudException('Unknown failure') except PyiCloudException as error: - # Reset to the inital 2FA state to allow the user to retry + # Reset to the initial 2FA state to allow the user to retry _LOGGER.error("Failed to verify verification code: %s", error) self._trusted_device = None self._verification_code = None diff --git a/homeassistant/components/device_tracker/snmp.py b/homeassistant/components/device_tracker/snmp.py index 3efae2b9ce2e..25176cd82d08 100644 --- a/homeassistant/components/device_tracker/snmp.py +++ b/homeassistant/components/device_tracker/snmp.py @@ -75,7 +75,7 @@ class SnmpScanner(DeviceScanner): return [client['mac'] for client in self.last_results if client.get('mac')] - # Supressing no-self-use warning + # Suppressing no-self-use warning # pylint: disable=R0201 def get_device_name(self, device): """Return the name of the given device or None if we don't know.""" diff --git a/homeassistant/components/device_tracker/xiaomi.py b/homeassistant/components/device_tracker/xiaomi.py index 8b8db3da2d8b..12e64b724dd3 100644 --- a/homeassistant/components/device_tracker/xiaomi.py +++ b/homeassistant/components/device_tracker/xiaomi.py @@ -69,7 +69,7 @@ class XiaomiDeviceScanner(DeviceScanner): return self.mac2name.get(device.upper(), None) def _update_info(self): - """Ensure the informations from the router are up to date. + """Ensure the information from the router are up to date. Returns true if scanning successful. """ diff --git a/homeassistant/components/downloader.py b/homeassistant/components/downloader.py index 2e26b306673b..0450ba175ee0 100644 --- a/homeassistant/components/downloader.py +++ b/homeassistant/components/downloader.py @@ -122,7 +122,7 @@ def setup(hass, config): _LOGGER.info("Downloading of %s done", url) except requests.exceptions.ConnectionError: - _LOGGER.exception("ConnectionError occured for %s", url) + _LOGGER.exception("ConnectionError occurred for %s", url) # Remove file if we started downloading but failed if final_path and os.path.isfile(final_path): diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index ca056398d2bf..2feea724cb77 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -148,7 +148,7 @@ class Config(object): self.listen_port) if self.type == TYPE_GOOGLE and self.listen_port != 80: - _LOGGER.warning("When targetting Google Home, listening port has " + _LOGGER.warning("When targeting Google Home, listening port has " "to be port 80") # Get whether or not UPNP binds to multicast address (239.255.255.250) diff --git a/homeassistant/components/emulated_hue/upnp.py b/homeassistant/components/emulated_hue/upnp.py index 42a258cbf4b4..548b6f3d7719 100644 --- a/homeassistant/components/emulated_hue/upnp.py +++ b/homeassistant/components/emulated_hue/upnp.py @@ -1,4 +1,4 @@ -"""Provides a UPNP discovery method that mimicks Hue hubs.""" +"""Provides a UPNP discovery method that mimics Hue hubs.""" import threading import socket import logging @@ -123,14 +123,14 @@ USN: uuid:Socket-1_0-221438K0100073::urn:schemas-upnp-org:device:basic:1 if ssdp_socket in read: data, addr = ssdp_socket.recvfrom(1024) else: - # most likely the timeout, so check for interupt + # most likely the timeout, so check for interrupt continue except socket.error as ex: if self._interrupted: clean_socket_close(ssdp_socket) return - _LOGGER.error("UPNP Responder socket exception occured: %s", + _LOGGER.error("UPNP Responder socket exception occurred: %s", ex.__str__) # without the following continue, a second exception occurs # because the data object has not been initialized diff --git a/homeassistant/components/fan/insteon_local.py b/homeassistant/components/fan/insteon_local.py index 5bdfec084279..e12e3476c3a1 100644 --- a/homeassistant/components/fan/insteon_local.py +++ b/homeassistant/components/fan/insteon_local.py @@ -137,7 +137,7 @@ class InsteonLocalFanDevice(FanEntity): @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self.node.deviceName @property diff --git a/homeassistant/components/image_processing/seven_segments.py b/homeassistant/components/image_processing/seven_segments.py index d91f46660463..60b2eadee92c 100644 --- a/homeassistant/components/image_processing/seven_segments.py +++ b/homeassistant/components/image_processing/seven_segments.py @@ -1,5 +1,5 @@ """ -Local optical character recognition processing of seven segements displays. +Local optical character recognition processing of seven segments displays. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/image_processing.seven_segments/ diff --git a/homeassistant/components/knx.py b/homeassistant/components/knx.py index 047620860b9b..4b976e6ca3f0 100644 --- a/homeassistant/components/knx.py +++ b/homeassistant/components/knx.py @@ -217,7 +217,7 @@ class KNXModule(object): @asyncio.coroutine def service_send_to_knx_bus(self, call): - """Service for sending an arbitray KNX message to the KNX bus.""" + """Service for sending an arbitrary KNX message to the KNX bus.""" from xknx.knx import Telegram, Address, DPTBinary, DPTArray attr_payload = call.data.get(SERVICE_KNX_ATTR_PAYLOAD) attr_address = call.data.get(SERVICE_KNX_ATTR_ADDRESS) diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index 79d80d2b8a03..d4e650f2ba59 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -206,7 +206,7 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable, if not skip_groups: # Group ID 0 is a special group in the hub for all lights, but it - # is not returned by get_api() so explicity get it and include it. + # is not returned by get_api() so explicitly get it and include it. # See https://developers.meethue.com/documentation/ # groups-api#21_get_all_groups _LOGGER.debug("Getting group 0 from bridge") diff --git a/homeassistant/components/light/insteon_local.py b/homeassistant/components/light/insteon_local.py index ebd6ab92d0fd..8917a9e9ccf3 100644 --- a/homeassistant/components/light/insteon_local.py +++ b/homeassistant/components/light/insteon_local.py @@ -134,7 +134,7 @@ class InsteonLocalDimmerDevice(Light): @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self.node.deviceName @property diff --git a/homeassistant/components/light/insteon_plm.py b/homeassistant/components/light/insteon_plm.py index 3b3dd43f4965..51de9f03df58 100644 --- a/homeassistant/components/light/insteon_plm.py +++ b/homeassistant/components/light/insteon_plm.py @@ -60,12 +60,12 @@ class InsteonPLMDimmerDevice(Light): @property def address(self): - """Return the the address of the node.""" + """Return the address of the node.""" return self._address @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self._name @property diff --git a/homeassistant/components/light/rflink.py b/homeassistant/components/light/rflink.py index 0b56f1de0acb..4308be107dd0 100644 --- a/homeassistant/components/light/rflink.py +++ b/homeassistant/components/light/rflink.py @@ -123,7 +123,7 @@ def devices_from_config(domain_config, hass=None): _LOGGER.warning( "Hybrid type for %s not compatible with signal " "repetitions. Please set 'dimmable' or 'switchable' " - "type explicity in configuration", device_id) + "type explicitly in configuration", device_id) device = entity_class(device_id, hass, **device_config) devices.append(device) diff --git a/homeassistant/components/light/tellstick.py b/homeassistant/components/light/tellstick.py index 98af61ffb7d8..598cd22c9860 100644 --- a/homeassistant/components/light/tellstick.py +++ b/homeassistant/components/light/tellstick.py @@ -56,7 +56,7 @@ class TellstickLight(TellstickDevice, Light): return kwargs.get(ATTR_BRIGHTNESS) def _parse_tellcore_data(self, tellcore_data): - """Turn the value recieved from tellcore into something useful.""" + """Turn the value received from tellcore into something useful.""" if tellcore_data is not None: brightness = int(tellcore_data) return brightness diff --git a/homeassistant/components/lock/services.yaml b/homeassistant/components/lock/services.yaml index 04e9f458f9cb..3fde6a2d8ad1 100644 --- a/homeassistant/components/lock/services.yaml +++ b/homeassistant/components/lock/services.yaml @@ -17,7 +17,7 @@ get_usercode: description: Node id of the lock example: 18 code_slot: - description: Code slot to retrive a code from + description: Code slot to retrieve a code from example: 1 nuki_lock_n_go: diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index 870252cc55e5..2ff957186bac 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -637,11 +637,11 @@ class MediaPlayerDevice(Entity): return self.hass.async_add_job(self.set_volume_level, volume) def media_play(self): - """Send play commmand.""" + """Send play command.""" raise NotImplementedError() def async_media_play(self): - """Send play commmand. + """Send play command. This method must be run in the event loop and returns a coroutine. """ diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py index 780bd0e31add..2aebbac5043e 100644 --- a/homeassistant/components/media_player/cast.py +++ b/homeassistant/components/media_player/cast.py @@ -287,7 +287,7 @@ class CastDevice(MediaPlayerDevice): self.cast.set_volume(volume) def media_play(self): - """Send play commmand.""" + """Send play command.""" self.cast.media_controller.play() def media_pause(self): diff --git a/homeassistant/components/media_player/directv.py b/homeassistant/components/media_player/directv.py index a334dc7caa4c..a10b5cd8a250 100644 --- a/homeassistant/components/media_player/directv.py +++ b/homeassistant/components/media_player/directv.py @@ -1,5 +1,5 @@ """ -Support for the DirecTV recievers. +Support for the DirecTV receivers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.directv/ @@ -82,7 +82,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class DirecTvDevice(MediaPlayerDevice): - """Representation of a DirecTV reciever on the network.""" + """Representation of a DirecTV receiver on the network.""" def __init__(self, name, host, port, device): """Initialize the device.""" diff --git a/homeassistant/components/media_player/openhome.py b/homeassistant/components/media_player/openhome.py index b2242bfecad5..bca6f2ad7707 100644 --- a/homeassistant/components/media_player/openhome.py +++ b/homeassistant/components/media_player/openhome.py @@ -124,7 +124,7 @@ class OpenhomeDevice(MediaPlayerDevice): self._device.Stop() def media_play(self): - """Send play commmand.""" + """Send play command.""" self._device.Play() def media_next_track(self): diff --git a/homeassistant/components/media_player/philips_js.py b/homeassistant/components/media_player/philips_js.py index da572896ee0f..d8450d31ea40 100644 --- a/homeassistant/components/media_player/philips_js.py +++ b/homeassistant/components/media_player/philips_js.py @@ -151,11 +151,11 @@ class PhilipsTV(MediaPlayerDevice): self._state = STATE_OFF def media_previous_track(self): - """Send rewind commmand.""" + """Send rewind command.""" self._tv.sendKey('Previous') def media_next_track(self): - """Send fast forward commmand.""" + """Send fast forward command.""" self._tv.sendKey('Next') @property diff --git a/homeassistant/components/media_player/plex.py b/homeassistant/components/media_player/plex.py index a901cd1d569f..54ec61b50f82 100644 --- a/homeassistant/components/media_player/plex.py +++ b/homeassistant/components/media_player/plex.py @@ -711,7 +711,7 @@ class PlexClient(MediaPlayerDevice): if ("127.0.0.1" in client.baseurl and client.machineIdentifier == self.device.machineIdentifier): # point controls to server since that's where the - # playback is occuring + # playback is occurring _LOGGER.debug( "Local client detected, redirecting controls to " "Plex server: %s", self.entity_id) diff --git a/homeassistant/components/media_player/russound_rnet.py b/homeassistant/components/media_player/russound_rnet.py index 9ce3dcfc4f46..77a9939c36ca 100644 --- a/homeassistant/components/media_player/russound_rnet.py +++ b/homeassistant/components/media_player/russound_rnet.py @@ -135,7 +135,7 @@ class RussoundRNETDevice(MediaPlayerDevice): def set_volume_level(self, volume): """Set volume level. Volume has a range (0..1). - Translate this to a range of (0..100) as expected expected + Translate this to a range of (0..100) as expected by _russ.set_volume() """ self._russ.set_volume('1', self._zone_id, volume * 100) diff --git a/homeassistant/components/media_player/services.yaml b/homeassistant/components/media_player/services.yaml index 2cf3617cc611..993863ea7251 100644 --- a/homeassistant/components/media_player/services.yaml +++ b/homeassistant/components/media_player/services.yaml @@ -140,7 +140,7 @@ select_source: fields: entity_id: - description: Name(s) of entites to change source on + description: Name(s) of entities to change source on example: 'media_player.media_player.txnr535_0009b0d81f82' source: description: Name of the source to switch to. Platform dependent. @@ -151,7 +151,7 @@ clear_playlist: fields: entity_id: - description: Name(s) of entites to change source on + description: Name(s) of entities to change source on example: 'media_player.living_room_chromecast' shuffle_set: @@ -170,7 +170,7 @@ snapcast_snapshot: fields: entity_id: - description: Name(s) of entites that will be snapshotted. Platform dependent. + description: Name(s) of entities that will be snapshotted. Platform dependent. example: 'media_player.living_room' snapcast_restore: @@ -178,7 +178,7 @@ snapcast_restore: fields: entity_id: - description: Name(s) of entites that will be restored. Platform dependent. + description: Name(s) of entities that will be restored. Platform dependent. example: 'media_player.living_room' sonos_join: @@ -190,7 +190,7 @@ sonos_join: example: 'media_player.living_room_sonos' entity_id: - description: Name(s) of entites that will coordinate the grouping. Platform dependent. + description: Name(s) of entities that will coordinate the grouping. Platform dependent. example: 'media_player.living_room_sonos' sonos_unjoin: @@ -198,7 +198,7 @@ sonos_unjoin: fields: entity_id: - description: Name(s) of entites that will be unjoined from their group. Platform dependent. + description: Name(s) of entities that will be unjoined from their group. Platform dependent. example: 'media_player.living_room_sonos' sonos_snapshot: @@ -206,7 +206,7 @@ sonos_snapshot: fields: entity_id: - description: Name(s) of entites that will be snapshot. Platform dependent. + description: Name(s) of entities that will be snapshot. Platform dependent. example: 'media_player.living_room_sonos' with_group: @@ -218,7 +218,7 @@ sonos_restore: fields: entity_id: - description: Name(s) of entites that will be restored. Platform dependent. + description: Name(s) of entities that will be restored. Platform dependent. example: 'media_player.living_room_sonos' with_group: @@ -230,7 +230,7 @@ sonos_set_sleep_timer: fields: entity_id: - description: Name(s) of entites that will have a timer set. + description: Name(s) of entities that will have a timer set. example: 'media_player.living_room_sonos' sleep_time: description: Number of seconds to set the timer @@ -241,7 +241,7 @@ sonos_clear_sleep_timer: fields: entity_id: - description: Name(s) of entites that will have the timer cleared. + description: Name(s) of entities that will have the timer cleared. example: 'media_player.living_room_sonos' diff --git a/homeassistant/components/media_player/sonos.py b/homeassistant/components/media_player/sonos.py index a5ef91ecc87a..410728dafaab 100644 --- a/homeassistant/components/media_player/sonos.py +++ b/homeassistant/components/media_player/sonos.py @@ -915,8 +915,8 @@ class SonosDevice(MediaPlayerDevice): """Replace queue with playlist represented by src. Playlists can't be played directly with the self._player.play_uri - API as they are actually composed of mulitple URLs. Until soco has - suppport for playing a playlist, we'll need to parse the playlist item + API as they are actually composed of multiple URLs. Until soco has + support for playing a playlist, we'll need to parse the playlist item and replace the current queue in order to play it. """ import soco @@ -1116,7 +1116,7 @@ class SonosDevice(MediaPlayerDevice): return ## - # old is allready master, rejoin + # old is already master, rejoin if old.coordinator.group.coordinator == old.coordinator: self._player.join(old.coordinator) return diff --git a/homeassistant/components/media_player/universal.py b/homeassistant/components/media_player/universal.py index b79c708c33c8..9647f04f5c3a 100644 --- a/homeassistant/components/media_player/universal.py +++ b/homeassistant/components/media_player/universal.py @@ -441,7 +441,7 @@ class UniversalMediaPlayer(MediaPlayerDevice): SERVICE_VOLUME_SET, data, allow_override=True) def async_media_play(self): - """Send play commmand. + """Send play command. This method must be run in the event loop and returns a coroutine. """ diff --git a/homeassistant/components/media_player/vlc.py b/homeassistant/components/media_player/vlc.py index f77b06054e12..d33464950150 100644 --- a/homeassistant/components/media_player/vlc.py +++ b/homeassistant/components/media_player/vlc.py @@ -137,7 +137,7 @@ class VlcDevice(MediaPlayerDevice): self._volume = volume def media_play(self): - """Send play commmand.""" + """Send play command.""" self._vlc.play() self._state = STATE_PLAYING diff --git a/homeassistant/components/media_player/yamaha.py b/homeassistant/components/media_player/yamaha.py index f2e64b1fb251..c413bfd3357d 100644 --- a/homeassistant/components/media_player/yamaha.py +++ b/homeassistant/components/media_player/yamaha.py @@ -214,7 +214,7 @@ class YamahaDevice(MediaPlayerDevice): self._volume = (self._receiver.volume / 100) + 1 def media_play(self): - """Send play commmand.""" + """Send play command.""" self._call_playback_function(self._receiver.play, "play") def media_pause(self): diff --git a/homeassistant/components/notify/apns.py b/homeassistant/components/notify/apns.py index 136d53001832..250ef5c50c84 100644 --- a/homeassistant/components/notify/apns.py +++ b/homeassistant/components/notify/apns.py @@ -111,7 +111,7 @@ class ApnsDevice(object): return self.device_disabled def disable(self): - """Disable the device from recieving notifications.""" + """Disable the device from receiving notifications.""" self.device_disabled = True def __eq__(self, other): diff --git a/homeassistant/components/notify/kodi.py b/homeassistant/components/notify/kodi.py index eda01c130869..05f4c5d17f3c 100644 --- a/homeassistant/components/notify/kodi.py +++ b/homeassistant/components/notify/kodi.py @@ -53,7 +53,7 @@ def async_get_service(hass, config, discovery_info=None): if host.startswith('http://') or host.startswith('https://'): host = host.lstrip('http://').lstrip('https://') _LOGGER.warning( - "Kodi host name should no longer conatin http:// See updated " + "Kodi host name should no longer contain http:// See updated " "definitions here: " "https://home-assistant.io/components/media_player.kodi/") diff --git a/homeassistant/components/recorder/migration.py b/homeassistant/components/recorder/migration.py index 5a68fe43fe0a..325267b857eb 100644 --- a/homeassistant/components/recorder/migration.py +++ b/homeassistant/components/recorder/migration.py @@ -47,7 +47,7 @@ def _create_index(engine, table_name, index_name): table = Table(table_name, models.Base.metadata) _LOGGER.debug("Looking up index for table %s", table_name) - # Look up the index object by name from the table is the the models + # Look up the index object by name from the table is the models index = next(idx for idx in table.indexes if idx.name == index_name) _LOGGER.debug("Creating %s index", index_name) _LOGGER.info("Adding index `%s` to database. Note: this can take several " @@ -151,7 +151,7 @@ def _apply_update(engine, new_version, old_version): def _inspect_schema_version(engine, session): """Determine the schema version by inspecting the db structure. - When the schema verison is not present in the db, either db was just + When the schema version is not present in the db, either db was just created with the correct schema, or this is a db created before schema versions were tracked. For now, we'll test if the changes for schema version 1 are present to make the determination. Eventually this logic diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 76fde35410d3..4f360e860bd4 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -155,7 +155,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): stop_listerer() # reflect disconnect state in devices state by setting an - # empty telegram resulting in `unkown` states + # empty telegram resulting in `unknown` states update_entities_telegram({}) # throttle reconnect attempts @@ -181,7 +181,7 @@ class DSMREntity(Entity): if self._obis not in self.telegram: return None - # get the attibute value if the object has it + # get the attribute value if the object has it dsmr_object = self.telegram[self._obis] return getattr(dsmr_object, attribute, None) diff --git a/homeassistant/components/sensor/envirophat.py b/homeassistant/components/sensor/envirophat.py index f2db833954f5..ce5e2a819397 100644 --- a/homeassistant/components/sensor/envirophat.py +++ b/homeassistant/components/sensor/envirophat.py @@ -171,7 +171,7 @@ class EnvirophatData(object): self.light = self.envirophat.light.light() if self.use_leds: self.envirophat.leds.on() - # the three color values scaled agains the overall light, 0-255 + # the three color values scaled against the overall light, 0-255 self.light_red, self.light_green, self.light_blue = \ self.envirophat.light.rgb() if self.use_leds: diff --git a/homeassistant/components/sensor/modbus.py b/homeassistant/components/sensor/modbus.py index 9453daea413a..0b2198bd3968 100644 --- a/homeassistant/components/sensor/modbus.py +++ b/homeassistant/components/sensor/modbus.py @@ -71,7 +71,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class ModbusRegisterSensor(Entity): - """Modbus resgister sensor.""" + """Modbus register sensor.""" def __init__(self, name, slave, register, register_type, unit_of_measurement, count, scale, offset, data_type, diff --git a/homeassistant/components/sensor/wunderground.py b/homeassistant/components/sensor/wunderground.py index 8f9a5ef1862d..b68ef67bf374 100644 --- a/homeassistant/components/sensor/wunderground.py +++ b/homeassistant/components/sensor/wunderground.py @@ -139,7 +139,7 @@ class WUDailySimpleForecastSensorConfig(WUSensorConfig): wu_unit (string): "fahrenheit", "celsius", "degrees" etc. see the example json at: https://www.wunderground.com/weather/api/d/docs?d=data/forecast&MR=1 - ha_unit (string): coresponding unit in home assistant + ha_unit (string): corresponding unit in home assistant title (string): friendly_name of the sensor """ super().__init__( diff --git a/homeassistant/components/services.yaml b/homeassistant/components/services.yaml index 865a6c7df588..0c9f1daf70f2 100644 --- a/homeassistant/components/services.yaml +++ b/homeassistant/components/services.yaml @@ -162,7 +162,7 @@ homematic: example: 1 set_dev_value: - description: Set a device property on RPC XML inteface. + description: Set a device property on RPC XML interface. fields: address: @@ -333,7 +333,7 @@ hdmi_cec: description: Select HDMI device. fields: device: - description: Addres of device to select. Can be entity_id, physical address or alias from confuguration. + description: Address of device to select. Can be entity_id, physical address or alias from confuguration. example: '"switch.hdmi_1" or "1.1.0.0" or "01:10"' power_on: @@ -347,21 +347,21 @@ ffmpeg: description: Send a start command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entites that will start. Platform dependent. + description: Name(s) of entities that will start. Platform dependent. example: 'binary_sensor.ffmpeg_noise' stop: description: Send a stop command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entites that will stop. Platform dependent. + description: Name(s) of entities that will stop. Platform dependent. example: 'binary_sensor.ffmpeg_noise' restart: description: Send a restart command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entites that will restart. Platform dependent. + description: Name(s) of entities that will restart. Platform dependent. example: 'binary_sensor.ffmpeg_noise' logger: diff --git a/homeassistant/components/sleepiq.py b/homeassistant/components/sleepiq.py index d9d81d3fee0c..baf6d154c669 100644 --- a/homeassistant/components/sleepiq.py +++ b/homeassistant/components/sleepiq.py @@ -117,7 +117,7 @@ class SleepIQSensor(Entity): def update(self): """Get the latest data from SleepIQ and updates the states.""" # Call the API for new sleepiq data. Each sensor will re-trigger this - # same exact call, but thats fine. We cache results for a short period + # same exact call, but that's fine. We cache results for a short period # of time to prevent hitting API limits. self.sleepiq_data.update() diff --git a/homeassistant/components/switch/acer_projector.py b/homeassistant/components/switch/acer_projector.py index f32829b06330..58361b2e8b2d 100644 --- a/homeassistant/components/switch/acer_projector.py +++ b/homeassistant/components/switch/acer_projector.py @@ -109,7 +109,7 @@ class AcerSwitch(SwitchDevice): def _write_read_format(self, msg): """Write msg, obtain awnser and format output.""" - # awnsers are formated as ***\rawnser\r*** + # awnsers are formatted as ***\rawnser\r*** awns = self._write_read(msg) match = re.search(r'\r(.+)\r', awns) if match: diff --git a/homeassistant/components/switch/android_ip_webcam.py b/homeassistant/components/switch/android_ip_webcam.py index df86b3fbb8ff..8de2ce593afb 100644 --- a/homeassistant/components/switch/android_ip_webcam.py +++ b/homeassistant/components/switch/android_ip_webcam.py @@ -47,7 +47,7 @@ class IPWebcamSettingsSwitch(AndroidIPCamEntity, SwitchDevice): @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self._name @asyncio.coroutine diff --git a/homeassistant/components/switch/insteon_local.py b/homeassistant/components/switch/insteon_local.py index 94259b8bb800..674a20278b38 100644 --- a/homeassistant/components/switch/insteon_local.py +++ b/homeassistant/components/switch/insteon_local.py @@ -130,7 +130,7 @@ class InsteonLocalSwitchDevice(SwitchDevice): @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self.node.deviceName @property diff --git a/homeassistant/components/switch/insteon_plm.py b/homeassistant/components/switch/insteon_plm.py index ee192b82be44..ed7d0ffc4793 100644 --- a/homeassistant/components/switch/insteon_plm.py +++ b/homeassistant/components/switch/insteon_plm.py @@ -55,12 +55,12 @@ class InsteonPLMSwitchDevice(SwitchDevice): @property def address(self): - """Return the the address of the node.""" + """Return the address of the node.""" return self._address @property def name(self): - """Return the the name of the node.""" + """Return the name of the node.""" return self._name @property diff --git a/homeassistant/components/switch/services.yaml b/homeassistant/components/switch/services.yaml index 00b2abb91a4d..5fdd8142ffc7 100644 --- a/homeassistant/components/switch/services.yaml +++ b/homeassistant/components/switch/services.yaml @@ -29,7 +29,7 @@ mysensors_send_ir_code: fields: entity_id: - description: Name(s) of entites that should have the IR code set and be turned on. Platform dependent. + description: Name(s) of entities that should have the IR code set and be turned on. Platform dependent. example: 'switch.living_room_1_1' V_IR_SEND: diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index c631eedc050a..de7a3bf45456 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -39,7 +39,7 @@ class TellstickSwitch(TellstickDevice, ToggleEntity): return None def _parse_tellcore_data(self, tellcore_data): - """Turn the value recieved from tellcore into something useful.""" + """Turn the value received from tellcore into something useful.""" return None def _update_model(self, new_state, data): diff --git a/homeassistant/components/tellduslive.py b/homeassistant/components/tellduslive.py index 01ccb981cfad..1f2b37200624 100644 --- a/homeassistant/components/tellduslive.py +++ b/homeassistant/components/tellduslive.py @@ -53,7 +53,8 @@ def setup(hass, config): if not client.validate_session(): _LOGGER.error( "Authentication Error: Please make sure you have configured your " - "keys that can be aquired from https://api.telldus.com/keys/index") + "keys that can be acquired from " + "https://api.telldus.com/keys/index") return False hass.data[DOMAIN] = client @@ -173,7 +174,7 @@ class TelldusLiveEntity(Entity): @property def device(self): - """Return the representaion of the device.""" + """Return the representation of the device.""" return self._client.device(self.device_id) @property diff --git a/homeassistant/components/tellstick.py b/homeassistant/components/tellstick.py index 5d0ec78dfa7c..6ae96b88da75 100644 --- a/homeassistant/components/tellstick.py +++ b/homeassistant/components/tellstick.py @@ -192,7 +192,7 @@ class TellstickDevice(Entity): raise NotImplementedError def _parse_tellcore_data(self, tellcore_data): - """Turn the value recieved from tellcore into something useful.""" + """Turn the value received from tellcore into something useful.""" raise NotImplementedError def _update_model(self, new_state, data): diff --git a/homeassistant/components/vacuum/roomba.py b/homeassistant/components/vacuum/roomba.py index 37cd9d067856..500b98420fc0 100644 --- a/homeassistant/components/vacuum/roomba.py +++ b/homeassistant/components/vacuum/roomba.py @@ -310,7 +310,7 @@ class RoombaVacuum(VacuumDevice): if error_msg and error_msg != 'None': self._state_attrs[ATTR_ERROR] = error_msg - # Not all Roombas expose positon data + # Not all Roombas expose position data # https://github.com/koalazak/dorita980/issues/48 if self._capabilities[CAP_POSITION]: pos_state = state.get('pose', {}) diff --git a/homeassistant/components/zha/__init__.py b/homeassistant/components/zha/__init__.py index 1b2d46ee72b0..55fb0e41cb24 100644 --- a/homeassistant/components/zha/__init__.py +++ b/homeassistant/components/zha/__init__.py @@ -218,7 +218,7 @@ class ApplicationListener: class Entity(entity.Entity): """A base class for ZHA entities.""" - _domain = None # Must be overriden by subclasses + _domain = None # Must be overridden by subclasses def __init__(self, endpoint, in_clusters, out_clusters, manufacturer, model, **kwargs): diff --git a/homeassistant/core.py b/homeassistant/core.py index 187dfcf1b836..a8704869f210 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -218,7 +218,7 @@ class HomeAssistant(object): else: task = self.loop.run_in_executor(None, target, *args) - # If a task is sheduled + # If a task is scheduled if self._track_task and task is not None: self._pending_tasks.append(task) @@ -914,7 +914,7 @@ class ServiceRegistry(object): Waits a maximum of SERVICE_CALL_LIMIT. If blocking = True, will return boolean if service executed - succesfully within SERVICE_CALL_LIMIT. + successfully within SERVICE_CALL_LIMIT. This method will fire an event to call the service. This event will be picked up by this ServiceRegistry and any @@ -937,7 +937,7 @@ class ServiceRegistry(object): Waits a maximum of SERVICE_CALL_LIMIT. If blocking = True, will return boolean if service executed - succesfully within SERVICE_CALL_LIMIT. + successfully within SERVICE_CALL_LIMIT. This method will fire an event to call the service. This event will be picked up by this ServiceRegistry and any diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 835b616987cb..b2928e73070a 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -71,7 +71,7 @@ class Entity(object): # If we reported if this entity was slow _slow_reported = False - # protect for multible updates + # protect for multiple updates _update_warn = None @property diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index b44905a31410..bafaf4d0fdbb 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -117,7 +117,7 @@ class Script(): wait_template = action[CONF_WAIT_TEMPLATE] wait_template.hass = self.hass - # check if condition allready okay + # check if condition already okay if condition.async_template( self.hass, wait_template, variables): continue diff --git a/homeassistant/scripts/influxdb_migrator.py b/homeassistant/scripts/influxdb_migrator.py index 6f130d187572..cad8f878ca6c 100644 --- a/homeassistant/scripts/influxdb_migrator.py +++ b/homeassistant/scripts/influxdb_migrator.py @@ -104,7 +104,7 @@ def run(script_args: List) -> int: for index, measurement in enumerate(measurements): client.query('''SELECT * INTO {}..:MEASUREMENT FROM ''' '"{}" GROUP BY *'.format(old_dbname, measurement)) - # Print progess + # Print progress print_progress(index + 1, nb_measurements) # Delete the database @@ -184,7 +184,7 @@ def run(script_args: List) -> int: else: # Increment offset offset += args.step - # Print progess + # Print progress print_progress(index + 1, nb_measurements) # Delete database if needed diff --git a/homeassistant/util/__init__.py b/homeassistant/util/__init__.py index 824f3969b2c2..646edcf1c356 100644 --- a/homeassistant/util/__init__.py +++ b/homeassistant/util/__init__.py @@ -268,7 +268,7 @@ class Throttle(object): # We want to be able to differentiate between function and unbound # methods (which are considered functions). - # All methods have the classname in their qualname seperated by a '.' + # All methods have the classname in their qualname separated by a '.' # Functions have a '.' in their qualname if defined inline, but will # be prefixed by '..' so we strip that out. is_func = (not hasattr(method, '__self__') and diff --git a/homeassistant/util/color.py b/homeassistant/util/color.py index d76816cfbb88..9616774c6230 100644 --- a/homeassistant/util/color.py +++ b/homeassistant/util/color.py @@ -10,7 +10,7 @@ _LOGGER = logging.getLogger(__name__) # Official CSS3 colors from w3.org: # https://www.w3.org/TR/2010/PR-css3-color-20101028/#html4 # names do not have spaces in them so that we can compare against -# reuqests more easily (by removing spaces from the requests as well). +# requests more easily (by removing spaces from the requests as well). # This lets "dark seagreen" and "dark sea green" both match the same # color "darkseagreen". COLORS = { @@ -308,7 +308,7 @@ def color_rgbw_to_rgb(r, g, b, w): # Add the white channel back into the rgb channels. rgb = (r + w, g + w, b + w) - # Match the output maximum value to the input. This ensures the the + # Match the output maximum value to the input. This ensures the # output doesn't overflow. return _match_max_scale((r, g, b, w), rgb) diff --git a/homeassistant/util/location.py b/homeassistant/util/location.py index c7bc42052979..8b07a344148d 100644 --- a/homeassistant/util/location.py +++ b/homeassistant/util/location.py @@ -146,7 +146,7 @@ def vincenty(point1: Tuple[float, float], point2: Tuple[float, float], (-3 + 4 * cos2SigmaM ** 2))) s = AXIS_B * A * (sigma - deltaSigma) - s /= 1000 # Converion of meters to kilometers + s /= 1000 # Conversion of meters to kilometers if miles: s *= MILES_PER_KILOMETER # kilometers to miles diff --git a/script/test_docker b/script/test_docker index 9f3bbb4be075..bbea52a3a0bd 100755 --- a/script/test_docker +++ b/script/test_docker @@ -1,6 +1,6 @@ #!/bin/sh # Executes the tests with tox in a docker container. -# Every argment is passed to tox to allow running only a subset of tests. +# Every argument is passed to tox to allow running only a subset of tests. # The following example will only run media_player tests: # ./test_docker -- tests/components/media_player/ diff --git a/tests/common.py b/tests/common.py index f0d6a5bd057d..d7b603cca58d 100644 --- a/tests/common.py +++ b/tests/common.py @@ -477,7 +477,7 @@ def assert_setup_component(count, domain=None): - domain: The domain to count is optional. It can be automatically determined most of the time - Use as a context manager aroung setup.setup_component + Use as a context manager around setup.setup_component with assert_setup_component(0) as result_config: setup_component(hass, domain, start_config) # using result_config is optional diff --git a/tests/components/binary_sensor/test_aurora.py b/tests/components/binary_sensor/test_aurora.py index c18d07575cae..ed68d23905f5 100644 --- a/tests/components/binary_sensor/test_aurora.py +++ b/tests/components/binary_sensor/test_aurora.py @@ -64,7 +64,7 @@ class TestAuroraSensorSetUp(unittest.TestCase): @requests_mock.Mocker() def test_custom_threshold_works(self, mock_req): - """Test that the the config can take a custom forecast threshold.""" + """Test that the config can take a custom forecast threshold.""" uri = re.compile( "http://services\.swpc\.noaa\.gov/text/aurora-nowcast-map\.txt" ) diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index 4b69116f0104..97f6c0385df2 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -27,7 +27,7 @@ class TestSetupCamera(object): self.hass.stop() def test_setup_component(self): - """Setup demo platfrom on camera component.""" + """Setup demo platform on camera component.""" config = { camera.DOMAIN: { 'platform': 'demo' diff --git a/tests/components/climate/test_demo.py b/tests/components/climate/test_demo.py index 27d79b40aa88..d15249d61f3d 100644 --- a/tests/components/climate/test_demo.py +++ b/tests/components/climate/test_demo.py @@ -230,7 +230,7 @@ class TestDemoClimate(unittest.TestCase): self.assertEqual(None, state.attributes.get('hold_mode')) def test_set_aux_heat_bad_attr(self): - """Test setting the auxillary heater without required attribute.""" + """Test setting the auxiliary heater without required attribute.""" state = self.hass.states.get(ENTITY_CLIMATE) self.assertEqual('off', state.attributes.get('aux_heat')) climate.set_aux_heat(self.hass, None, ENTITY_CLIMATE) @@ -245,7 +245,7 @@ class TestDemoClimate(unittest.TestCase): self.assertEqual('on', state.attributes.get('aux_heat')) def test_set_aux_heat_off(self): - """Test setting the auxillary heater off/false.""" + """Test setting the auxiliary heater off/false.""" climate.set_aux_heat(self.hass, False, ENTITY_CLIMATE) self.hass.block_till_done() state = self.hass.states.get(ENTITY_CLIMATE) diff --git a/tests/components/cloud/test_http_api.py b/tests/components/cloud/test_http_api.py index fc9b3cce8644..e79f23c0845b 100644 --- a/tests/components/cloud/test_http_api.py +++ b/tests/components/cloud/test_http_api.py @@ -142,7 +142,7 @@ def test_logout_view_request_timeout(mock_auth, cloud_client): @asyncio.coroutine def test_logout_view_unknown_error(mock_auth, cloud_client): - """Test unknown error while loggin out.""" + """Test unknown error while logging out.""" mock_auth.logout.side_effect = auth_api.UnknownError req = yield from cloud_client.post('/api/cloud/logout') assert req.status == 502 @@ -186,7 +186,7 @@ def test_register_view_request_timeout(mock_cognito, cloud_client): @asyncio.coroutine def test_register_view_unknown_error(mock_cognito, cloud_client): - """Test unknown error while loggin out.""" + """Test unknown error while logging out.""" mock_cognito.register.side_effect = auth_api.UnknownError req = yield from cloud_client.post('/api/cloud/register', json={ 'email': 'hello@bla.com', @@ -233,7 +233,7 @@ def test_confirm_register_view_request_timeout(mock_cognito, cloud_client): @asyncio.coroutine def test_confirm_register_view_unknown_error(mock_cognito, cloud_client): - """Test unknown error while loggin out.""" + """Test unknown error while logging out.""" mock_cognito.confirm_sign_up.side_effect = auth_api.UnknownError req = yield from cloud_client.post('/api/cloud/confirm_register', json={ 'email': 'hello@bla.com', @@ -274,7 +274,7 @@ def test_forgot_password_view_request_timeout(mock_cognito, cloud_client): @asyncio.coroutine def test_forgot_password_view_unknown_error(mock_cognito, cloud_client): - """Test unknown error while loggin out.""" + """Test unknown error while logging out.""" mock_cognito.initiate_forgot_password.side_effect = auth_api.UnknownError req = yield from cloud_client.post('/api/cloud/forgot_password', json={ 'email': 'hello@bla.com', @@ -329,7 +329,7 @@ def test_confirm_forgot_password_view_request_timeout(mock_cognito, @asyncio.coroutine def test_confirm_forgot_password_view_unknown_error(mock_cognito, cloud_client): - """Test unknown error while loggin out.""" + """Test unknown error while logging out.""" mock_cognito.confirm_forgot_password.side_effect = auth_api.UnknownError req = yield from cloud_client.post( '/api/cloud/confirm_forgot_password', json={ diff --git a/tests/components/emulated_hue/test_init.py b/tests/components/emulated_hue/test_init.py index 2dcb9ecbf21c..b9ef09fe4a74 100755 --- a/tests/components/emulated_hue/test_init.py +++ b/tests/components/emulated_hue/test_init.py @@ -125,4 +125,4 @@ def test_warning_config_google_home_listen_port(): assert mock_warn.called assert mock_warn.mock_calls[0][1][0] == \ - "When targetting Google Home, listening port has to be port 80" + "When targeting Google Home, listening port has to be port 80" diff --git a/tests/components/image_processing/test_init.py b/tests/components/image_processing/test_init.py index 816976751a71..0594c436abd2 100644 --- a/tests/components/image_processing/test_init.py +++ b/tests/components/image_processing/test_init.py @@ -24,7 +24,7 @@ class TestSetupImageProcessing(object): self.hass.stop() def test_setup_component(self): - """Setup demo platfrom on image_process component.""" + """Setup demo platform on image_process component.""" config = { ip.DOMAIN: { 'platform': 'demo' @@ -35,7 +35,7 @@ class TestSetupImageProcessing(object): setup_component(self.hass, ip.DOMAIN, config) def test_setup_component_with_service(self): - """Setup demo platfrom on image_process component test service.""" + """Setup demo platform on image_process component test service.""" config = { ip.DOMAIN: { 'platform': 'demo' diff --git a/tests/components/light/test_mochad.py b/tests/components/light/test_mochad.py index b1644effd574..e69ebdb4aef7 100644 --- a/tests/components/light/test_mochad.py +++ b/tests/components/light/test_mochad.py @@ -32,7 +32,7 @@ class TestMochadSwitchSetup(unittest.TestCase): self.hass = get_test_home_assistant() def tearDown(self): - """Stop everyhing that was started.""" + """Stop everything that was started.""" self.hass.stop() @mock.patch('homeassistant.components.light.mochad.MochadLight') diff --git a/tests/components/media_player/test_yamaha.py b/tests/components/media_player/test_yamaha.py index 8cea5f7c63e4..ad443fadebb9 100644 --- a/tests/components/media_player/test_yamaha.py +++ b/tests/components/media_player/test_yamaha.py @@ -29,7 +29,7 @@ class FakeYamaha(rxv.rxv.RXV): @property def input(self): - """A fake input for the reciever.""" + """A fake input for the receiver.""" return self._fake_input @input.setter @@ -39,7 +39,7 @@ class FakeYamaha(rxv.rxv.RXV): self._fake_input = input_name def inputs(self): - """All inputs of the the fake receiver.""" + """All inputs of the fake receiver.""" return {'AUDIO1': None, 'AUDIO2': None, 'AV1': None, diff --git a/tests/components/sensor/test_mfi.py b/tests/components/sensor/test_mfi.py index 8b037209cbc9..ae967449ef21 100644 --- a/tests/components/sensor/test_mfi.py +++ b/tests/components/sensor/test_mfi.py @@ -61,7 +61,7 @@ class TestMfiSensorSetup(unittest.TestCase): @mock.patch('mficlient.client.MFiClient') def test_setup_failed_connect(self, mock_client): - """Test setup with conection failure.""" + """Test setup with connection failure.""" mock_client.side_effect = requests.exceptions.ConnectionError self.assertFalse( self.PLATFORM.setup_platform( diff --git a/tests/components/switch/test_mochad.py b/tests/components/switch/test_mochad.py index 0851bfbc324c..8011d85860e7 100644 --- a/tests/components/switch/test_mochad.py +++ b/tests/components/switch/test_mochad.py @@ -32,7 +32,7 @@ class TestMochadSwitchSetup(unittest.TestCase): self.hass = get_test_home_assistant() def tearDown(self): - """Stop everyhing that was started.""" + """Stop everything that was started.""" self.hass.stop() @mock.patch('homeassistant.components.switch.mochad.MochadSwitch') diff --git a/tests/components/switch/test_rflink.py b/tests/components/switch/test_rflink.py index b261d9c9b49a..f215b16d7466 100644 --- a/tests/components/switch/test_rflink.py +++ b/tests/components/switch/test_rflink.py @@ -81,7 +81,7 @@ def test_default_setup(hass, monkeypatch): assert hass.states.get('switch.test').state == 'on' # The switch component does not support adding new devices for incoming - # events because every new unkown device is added as a light by default. + # events because every new unknown device is added as a light by default. # test changing state from HA propagates to Rflink hass.async_add_job( diff --git a/tests/components/test_influxdb.py b/tests/components/test_influxdb.py index f117b62fddb7..7c98dfcd540d 100644 --- a/tests/components/test_influxdb.py +++ b/tests/components/test_influxdb.py @@ -578,7 +578,7 @@ class TestInfluxDB(unittest.TestCase): mock_client.return_value.write_points.reset_mock() def test_event_listener_component_override_measurement(self, mock_client): - """Test the event listener with overrided measurements.""" + """Test the event listener with overridden measurements.""" config = { 'influxdb': { 'host': 'host', diff --git a/tests/components/test_init.py b/tests/components/test_init.py index 222d25f644a1..06ba8a57508f 100644 --- a/tests/components/test_init.py +++ b/tests/components/test_init.py @@ -82,7 +82,7 @@ class TestComponentsCore(unittest.TestCase): # We can't test if our service call results in services being called # because by mocking out the call service method, we mock out all - # So we mimick how the service registry calls services + # So we mimic how the service registry calls services service_call = ha.ServiceCall('homeassistant', 'turn_on', { 'entity_id': ['light.test', 'sensor.bla', 'light.bla'] }) diff --git a/tests/components/test_logbook.py b/tests/components/test_logbook.py index aa4bc9fdf8c4..07c89b5dcd17 100644 --- a/tests/components/test_logbook.py +++ b/tests/components/test_logbook.py @@ -415,7 +415,7 @@ class TestComponentLogbook(unittest.TestCase): def test_home_assistant_start_stop_grouped(self): """Test if HA start and stop events are grouped. - Events that are occuring in the same minute. + Events that are occurring in the same minute. """ entries = list(logbook.humanify(( ha.Event(EVENT_HOMEASSISTANT_STOP), diff --git a/tests/helpers/test_entity_component.py b/tests/helpers/test_entity_component.py index 11717c75e202..efa079a7e4a4 100644 --- a/tests/helpers/test_entity_component.py +++ b/tests/helpers/test_entity_component.py @@ -183,7 +183,7 @@ class TestHelpersEntityComponent(unittest.TestCase): assert 2 == len(self.hass.states.entity_ids()) def test_update_state_adds_entities_with_update_befor_add_true(self): - """Test if call update befor add to state machine.""" + """Test if call update before add to state machine.""" component = EntityComponent(_LOGGER, DOMAIN, self.hass) ent = EntityTest() @@ -196,7 +196,7 @@ class TestHelpersEntityComponent(unittest.TestCase): assert ent.update.called def test_update_state_adds_entities_with_update_befor_add_false(self): - """Test if not call update befor add to state machine.""" + """Test if not call update before add to state machine.""" component = EntityComponent(_LOGGER, DOMAIN, self.hass) ent = EntityTest() @@ -209,7 +209,7 @@ class TestHelpersEntityComponent(unittest.TestCase): assert not ent.update.called def test_adds_entities_with_update_befor_add_true_deadlock_protect(self): - """Test if call update befor add to state machine. + """Test if call update before add to state machine. It need to run update inside executor and never call async_add_entities with True diff --git a/tests/util/test_yaml.py b/tests/util/test_yaml.py index 1b0b808b9c4b..918a684f3221 100644 --- a/tests/util/test_yaml.py +++ b/tests/util/test_yaml.py @@ -54,8 +54,8 @@ class TestYaml(unittest.TestCase): patch_yaml_files(files): yaml.load_yaml(YAML_CONFIG_FILE) - def test_enviroment_variable(self): - """Test config file with enviroment variable.""" + def test_environment_variable(self): + """Test config file with environment variable.""" os.environ["PASSWORD"] = "secret_password" conf = "password: !env_var PASSWORD" with io.StringIO(conf) as file: @@ -70,8 +70,8 @@ class TestYaml(unittest.TestCase): doc = yaml.yaml.safe_load(file) assert doc['password'] == "secret_password" - def test_invalid_enviroment_variable(self): - """Test config file with no enviroment variable sat.""" + def test_invalid_environment_variable(self): + """Test config file with no environment variable sat.""" conf = "password: !env_var PASSWORD" with self.assertRaises(HomeAssistantError): with io.StringIO(conf) as file: