diff --git a/CODEOWNERS b/CODEOWNERS index d6b0385614a05cc39005b2207d766d7166c6f7c5..6e088a84e5d85d4db634b311acc6a2021b325e57 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 6db147a5f593231a6f4a76e70717276aec02a4e0..a1c6811afe78c1b7932b2f6b6238da8c9c2d7d9a 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 2fae0b323a0fcc466b8aad7d5974ed2caeab45e5..a24583d8247168699b1e6bb9a7f9c30a1b57bb53 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 6223ebe50a1bcf916512c0cdc1891ab5e9ba08c5..2d4cbd8d070ef8ff16601d43288e0c7f78d1bfe5 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 0702ce8bb9e07e4a9d7c724d4672d1387c6f689f..1874be6ec413da407b56c1809ac7a18a8adf1241 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 f75f7644c4edb6851197831d4e8ec6cf9354471d..288b46c2370945ba78bc35c12c01d37df9f4550a 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 1ec9e703eab46f76e90b09e732d2412f83e3dab9..857c0c4077772a570645075cdbef04fde973aaa8 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 8b2401aa589191fa517ff60c8c234fcd198c1f94..ba798ce79026df3edfbd04ea47bb9243f61be1ab 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 81191e3025eb8cef16f977553cd332d46064b5d3..f1c80612f3ba4ea425a5ab1d8b92d744528e2ab6 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 1bb88050b2f02c63261ff1b865d930d18fe2e533..a531d25841b627c03c5c03b5ad3cfceaa13d8871 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 c3ba523468feb66e6ec3e60826b3c9ca750e0967..357b1d56200663ff5ef9d8e5218fe5d793de2f26 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 9b3b7d650a90a029f47956697d23f59263c1e280..9c712c632e6139caf8ada87fa718584af83b3ee1 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 b8ac66d91b31fcd0c1e6200138ff8d3d1b78fa59..760ef1310496dc11b91b10968c4b20f346744662 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 3656bf7b47582a7544ffb2c686746008572ab4f6..5929cec3b050cbc2d702e80eeb1798e91a3002e1 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 25492cb0895879450840837ed3fee6119256edb6..5b20462c245eddde24b83ce67af687cf9dd4b36e 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 3c038125616790e4962d9d6652d203578f689779..151009572429d2c3dbe0daa61d1e6d48c774c530 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 64e1a60ad086727fada6519c47ff6b27ee2197d5..781e486a40e83f29148c2ebd7f1b71c726aa87ba 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 34d9fd0f4586ce1beaa2e190c9a5d271064920a0..6a92ab640444329f57300833e6394b504ff9f079 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 910e33627a683406b94e88727062c7f4bc93a41c..97ac382031bb1fe8167902cd5bcaaac3af1ca6b4 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 8f5a18ff84356db78f3c1d46ad84cb222dc1fa26..610a531a702b944b58e0b9b6c0af323fdd6887a1 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 d8e9f668c8ed940c7376b73fbfe082e723365421..ba56e7c3837e2a090b7a6167948f76d238a9e538 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 db2a43d872805aba2ddc0b4032e0f7afe5517eed..70054e54075f8cf20023cdf38ab7405aa407c84e 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 bf4d99af9e7091a310b5e18a9feb9617ddf78904..c2946b51842c2dc55704e6384bcc22af7007cb8f 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 646bfcf421f18009a6120d8e04a4d53ad425067f..2c2b8364823d172bbefa67d794da4a80dd8213e4 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 8fafb88a7dbe4b7c306a0382cbb76802b5e152bd..5ba162a20d2a64aa28497e67b6f3c8efab20b415 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 51de9f03df58f92670e1e209c5b9670ad6c47c4b..f0ef0ce1b7ee2c32b0b0c40f721a91181e577630 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 efc62b054345b74af25fada1483377ff79ed2c99..576e244103f6e677c48f67dca4fb0c358e663d28 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 8b9ad0209da56f0af87d75ee8ff473b9010919b0..ea4df658ef6553b6b3384b373feef49c049a4515 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 a1e68555649dcc024abb999b6550f6fd35f57dba..8ff3746889e42ea46c7f9bfb5181eafef23876f3 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 293c6e51d52937264cac78a90ae67f27cc2337eb..474751c2574fefeb2b9efa1cdd5e58dbd0dd3be9 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 ca6b152a37ea13884314a826294d29454f3ce887..96323579822f4661062fdbd9b6d4aa3acdf2ba75 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 fe25422360c5facb698684738dbbaa92f639d5fb..bcbee5c4ff7b5c8004f55ae7d6b238206304e0c0 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 572405baa6e1465d58c63cf3e469f0e8ebfe9ae3..d85bd51e7fb86369ce9f1242293cd240e8f1b125 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 d26fce0ea88ba1ea3909c16296446fb5cbb7d037..44d19ac68603915c9fe5315de0729e2143ccea2b 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 13f05cc59f7a973f7b9f405c9a891585d8167bfa..82bd106af8d669309d0478dc2d6c2d92f669b8d9 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 e61ed05ce101b6d2e27a94ccdc9e2ad4d41ae3e6..5a0bf2af1c468598611442a8e07c5c05f49ca688 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 6ef758b7bb5bce99614d316ce659e28e7fdf2be0..e7a727bc5e2b477d3a3e335ab32f451b11e9be9d 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 73922d56040708920a859918db32fc1d342d6556..d97d4f38f0276baa4f013bc833c1dc0630c4cf7a 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 09d8ec4659cf941270d30c5328c755c8cc36f94d..081dc6cdc6ee9b0945b55f76522497952fd4f665 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 5b20ac0f4d0e3c71b780236aea5780a3df69b13b..1c12799549c9d7090f12891f4e420bf3e059a84a 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 fe05da3ccdd632b468120e0bd9cfd00ba645f93e..ef06458cd84a938f60f552cf6203e3d4f4bcf81b 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 e6f4addf00345475ade3e15044a2b798a67d58d4..e0a42fdb6a8dea75ed4aa4b998515e1dd3c44f2c 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 2bc7e5b3b3a685ac30d96f94642822b4a59299ba..aa1d2d9eff049eebaa9b8b5b906c2425d59bc6f1 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 af31c14789a38152c36c7f7469028f02bcc2902b..cae2eaf7437e7892070a9c1df3baf61d6822cc3b 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 d3b8b7207e391d565d082f27e4eafb182d88be47..c03aa0a2aecb62fe7396f4b5bc90fc32fc6d1199 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 8c7259ff80015c0a4c86ad43ae1510f081506e9b..7acdc1a20bd8c02c85bdd597b4eb8bb77f7e8f12 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 7d8c71f8d51a38b16555e96341ccffac0b950f7b..24c45ec1ff3ef219f9746d0de9e0b3dcc876f195 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 58361b2e8b2dee75867f082cf67ad4dc63eee4fd..d32c0610b662cc229501f497c77f223c92cb0450 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 5841642cc0091d8d9871e4be47fb5b07d6dcba8a..8353b4bf8ad4702fdf4081527a5a60fd85e4f3e7 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 0625a42f765c5f4dac333ca53bd8dcf6cdca7b72..f3af70c6222f743286db3c823c88d70f503ed991 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 ff432f2efc86a5de952ff035679616c6f39cce0f..7e3566f17b03408daf0230fa88a49d2a23c4b585 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 97d4320280d666de72493d181ef5287a50655230..67ebe95ba8e8a346da918c53a82811768edf6b02 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 ed7d0ffc4793edce5fb5806c7ba9e4d19eb7d59b..0b584e14b8d91abd4bedb58f503a5884c891021c 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 f373a6aad846399392b45dbd8b29abcaa1538246..a18d6544acc831b96216efb4307e285efebcdcf9 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 dfcf1816b7b9b25f969db88188d589b900a279f8..8b2734612defeed033ba794b03eace265d7214d5 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 dc864c9f61abb197ccea5caf2cbbe8426769a57a..4c144fe42db2ce8fcb7f7f6483de913ddffc6f2c 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 9b80581b85eeeae258ee47695d51b038fdef2ee4..abfd353e1f4383c57c668374d7d2f7502f472f20 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 ba8e177c9f76fbe6ae9a028501ff079b24ae3adf..61855143d59b453fa53d21f13709e3358378e280 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 18cf40d3854a19d667d9d06f53452a8a7861d666..b1cf9c51efdeb1c8acf7b8d1bfb384543c9d8d5a 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 e3816fdaa6f33618156454015cfc9f511aa3c015..5b5c674c32b46261eed286782c9ab71dd34b7781 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 6cd1916d4c2301cf2048cb8cc77e89e868ae2614..e74881e6e89b3768003b9285b21086594d7570b1 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 ac20f94d243c2b4c358d8a9aba5f5d76508055b5..4b9eec3d540699a0faed2397d50479f1876845b1 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 cb3ebeb7ee6a5b3efb7a011f51d7f7bb4a5e3232..c4fea2846c5e12a041663283fb973d4f240ed834 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 7daaf937975ade7ea37fb655e7173e1d5947af35..8a15c4f63203ecda7a46f1c43d8387161c758a42 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 70e95dd7b93c0096571373c0f757b3e8a51ed62d..87612da9faa7879640afb4d90e097cdebab6f8b0 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 b378118141a1d7140b88cfe00aab36e8891180d5..8bc3a60146cb3046bd47c5e14988f2596987be51 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 0d87b49122907c8e937d90e280bd681f0ed371e0..9fc35bc17b1a382a5d95987e0ea6d9402044125b 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 0594c436abd2dacc95414d14099ce2445434a06c..b0bb7d77e3c34f9bc28e8a5e0dd699262c13c3d0 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 001c419066f0c17b76ed2c603015d2e4095adec6..dd4b4b4a56ed74f3ae5922fa8d3685c8fe906752 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 815204e718ace02ba3558922c037c2871b3f1bce..d3ebc67931fd85b62e9536329dcc4a885ac1e6bb 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 3322f6021e76c083ec41afdf55854b239c3c1cc5..e17241485db8b09f527f2b3433ae07e8b7722312 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 7c558f2803d59752a03a5ced4c90475d670d6e7d..5ac9b3adb817c898da9a7d6fbc4594cccc3ec0c4 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 86e637ab1aed257b18fcf34b0bbce88ad58046cd..e5fca461a23dc69bd0ea65eacb8e62f492a4d38f 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 a52c841e0ccd4f20273336b51dc522ed868805c8..0acf08335434f9c6258264bd273c30817e11c964 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 e08229631cff588ae177eca8c83ec05fe06d2101..5b4ef4dcf5383d7e6eeeafc6d48e6632c65897ab 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 3109ea776bced642d4ba5f4c962cd8d25ab72f6d..40a0f8be3b2646e5d8e8e48a1e8622366daaad63 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 9047f26b2d1ee0e1ec1c6fffe2579f0616fd7198..c109ae30aade54e0a8e08484d6a91c8f0b08042d 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 ea952a7c073bdc82d47698b40964636cf58117dd..90a72a48a10cd36ec848a5101f6db3e43f84ee5a 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 410117949140190fbde04e6e47bd6e83f7488ff6..9aa730d6eb656445bafa91577a2ae1e59f20ef01 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 38b957ad1021b7abefca567d7b3112ff1f67edeb..734f4b548b91f430032109ea6cea27dfe1360f27 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):