From 8dcfd35b8b92a40f26131569afe689304d4e9bf8 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 29 Jan 2018 23:37:19 +0100 Subject: [PATCH] Spelling fixes (#12041) * Spelling fixes *Lots* of them. * Spelling breaking changes * Fix lint errors --- homeassistant/components/alexa/smart_home.py | 6 +- homeassistant/components/android_ip_webcam.py | 2 +- homeassistant/components/apcupsd.py | 2 +- homeassistant/components/arlo.py | 2 +- .../components/binary_sensor/ffmpeg_motion.py | 2 +- .../components/binary_sensor/hikvision.py | 2 +- .../components/binary_sensor/isy994.py | 4 +- .../components/binary_sensor/pilight.py | 6 +- homeassistant/components/camera/abode.py | 2 +- homeassistant/components/camera/rpi_camera.py | 6 +- .../components/climate/generic_thermostat.py | 2 +- homeassistant/components/climate/mysensors.py | 3 +- homeassistant/components/climate/netatmo.py | 2 +- homeassistant/components/climate/oem.py | 2 +- homeassistant/components/cover/homematic.py | 2 +- homeassistant/components/cover/knx.py | 2 +- homeassistant/components/cover/lutron.py | 2 +- .../components/device_tracker/asuswrt.py | 2 +- .../device_tracker/huawei_router.py | 2 +- .../components/device_tracker/ubus.py | 8 +- homeassistant/components/dominos.py | 2 +- homeassistant/components/downloader.py | 2 +- homeassistant/components/eight_sleep.py | 4 +- homeassistant/components/fan/__init__.py | 2 +- homeassistant/components/frontend/__init__.py | 4 +- homeassistant/components/google.py | 2 +- .../components/google_assistant/smart_home.py | 2 +- homeassistant/components/group/__init__.py | 2 +- .../components/homematic/__init__.py | 6 +- .../image_processing/microsoft_face_detect.py | 2 +- .../microsoft_face_identify.py | 6 +- .../image_processing/seven_segments.py | 2 +- homeassistant/components/input_boolean.py | 2 +- homeassistant/components/ios.py | 4 +- homeassistant/components/isy994.py | 2 +- homeassistant/components/light/__init__.py | 2 +- homeassistant/components/light/decora.py | 4 +- homeassistant/components/light/flux_led.py | 4 +- homeassistant/components/light/homematic.py | 2 +- homeassistant/components/light/iglo.py | 2 +- homeassistant/components/light/isy994.py | 2 +- homeassistant/components/light/knx.py | 2 +- homeassistant/components/logbook.py | 2 +- homeassistant/components/logger.py | 2 +- .../components/mailbox/asterisk_mbox.py | 2 +- .../components/media_player/bluesound.py | 4 +- homeassistant/components/media_player/cast.py | 2 +- homeassistant/components/media_player/emby.py | 2 +- .../components/media_player/hdmi_cec.py | 2 +- .../components/media_player/squeezebox.py | 2 +- .../components/media_player/volumio.py | 2 +- .../components/media_player/yamaha.py | 2 +- homeassistant/components/mysensors.py | 4 +- homeassistant/components/nest.py | 2 +- homeassistant/components/notify/knx.py | 2 +- homeassistant/components/qwikswitch.py | 2 +- homeassistant/components/rainbird.py | 6 +- homeassistant/components/remote/kira.py | 4 +- homeassistant/components/rfxtrx.py | 2 +- homeassistant/components/scsgate.py | 4 +- homeassistant/components/sensor/bme680.py | 2 +- homeassistant/components/sensor/dsmr.py | 8 +- homeassistant/components/sensor/ebox.py | 2 +- homeassistant/components/sensor/emoncms.py | 2 +- homeassistant/components/sensor/fido.py | 6 +- homeassistant/components/sensor/knx.py | 2 +- homeassistant/components/sensor/metoffice.py | 4 +- .../components/sensor/modem_callerid.py | 2 +- homeassistant/components/sensor/nut.py | 2 +- homeassistant/components/sensor/openevse.py | 2 +- homeassistant/components/sensor/pilight.py | 4 +- homeassistant/components/sensor/pushbullet.py | 2 +- homeassistant/components/sensor/statistics.py | 4 +- homeassistant/components/sensor/ted5000.py | 2 +- homeassistant/components/sensor/travisci.py | 2 +- .../components/sensor/uk_transport.py | 2 +- homeassistant/components/sensor/waqi.py | 2 +- .../components/sensor/wunderground.py | 6 +- homeassistant/components/sensor/zamg.py | 2 +- homeassistant/components/shopping_list.py | 2 +- homeassistant/components/snips.py | 2 +- .../components/switch/acer_projector.py | 6 +- homeassistant/components/switch/flux.py | 6 +- homeassistant/components/switch/knx.py | 2 +- homeassistant/components/switch/neato.py | 4 +- homeassistant/components/switch/pilight.py | 12 +- homeassistant/components/switch/rachio.py | 2 +- homeassistant/components/switch/rainbird.py | 2 +- homeassistant/components/tahoma.py | 2 +- .../components/telegram_bot/__init__.py | 4 +- homeassistant/components/usps.py | 2 +- homeassistant/components/vacuum/neato.py | 2 +- homeassistant/components/volvooncall.py | 2 +- homeassistant/components/weather/darksky.py | 2 +- .../components/weather/openweathermap.py | 2 +- homeassistant/components/zwave/const.py | 4 +- homeassistant/helpers/entity.py | 2 +- homeassistant/helpers/event.py | 2 +- homeassistant/helpers/script.py | 2 +- homeassistant/helpers/template.py | 2 +- homeassistant/scripts/influxdb_migrator.py | 2 +- .../automation/test_numeric_state.py | 2 +- tests/components/automation/test_state.py | 6 +- tests/components/automation/test_sun.py | 2 +- tests/components/binary_sensor/test_vultr.py | 2 +- tests/components/cover/test_template.py | 2 +- .../components/device_tracker/test_asuswrt.py | 2 +- tests/components/device_tracker/test_init.py | 2 +- tests/components/device_tracker/test_mqtt.py | 4 +- .../device_tracker/test_owntracks.py | 14 +-- tests/components/emulated_hue/test_hue_api.py | 4 +- tests/components/image_processing/__init__.py | 2 +- .../components/image_processing/test_init.py | 2 +- .../image_processing/test_openalpr_cloud.py | 4 +- tests/components/light/test_rflink.py | 2 +- tests/components/light/test_rfxtrx.py | 2 +- tests/components/light/test_zwave.py | 16 +-- .../media_player/test_soundtouch.py | 114 +++++++++--------- tests/components/notify/test_facebook.py | 2 +- tests/components/sensor/test_mqtt.py | 4 +- tests/components/sensor/test_random.py | 2 +- tests/components/sensor/test_ring.py | 2 +- tests/components/sensor/test_season.py | 16 +-- tests/components/test_alert.py | 2 +- tests/components/test_ffmpeg.py | 8 +- tests/components/test_hassio.py | 2 +- tests/components/test_init.py | 2 +- tests/components/test_pilight.py | 4 +- tests/components/test_plant.py | 2 +- tests/components/test_remember_the_milk.py | 2 +- tests/components/test_rflink.py | 2 +- tests/components/test_rss_feed_template.py | 2 +- tests/components/zwave/test_init.py | 2 +- tests/helpers/test_entity.py | 20 +-- tests/helpers/test_entity_component.py | 10 +- tests/helpers/test_entityfilter.py | 2 +- tests/helpers/test_service.py | 4 +- tests/util/test_distance.py | 2 +- 138 files changed, 285 insertions(+), 286 deletions(-) diff --git a/homeassistant/components/alexa/smart_home.py b/homeassistant/components/alexa/smart_home.py index e8ce147472c..f4981046b5b 100644 --- a/homeassistant/components/alexa/smart_home.py +++ b/homeassistant/components/alexa/smart_home.py @@ -51,8 +51,8 @@ class _DisplayCategory(object): # Describes a combination of devices set to a specific state, when the # state change must occur in a specific order. For example, a "watch - # Neflix" scene might require the: 1. TV to be powered on & 2. Input set to - # HDMI1. Applies to Scenes + # Netflix" scene might require the: 1. TV to be powered on & 2. Input set + # to HDMI1. Applies to Scenes ACTIVITY_TRIGGER = "ACTIVITY_TRIGGER" # Indicates media devices with video or photo capabilities. @@ -667,7 +667,7 @@ def api_message(request, } } - # If a correlation token exsits, add it to header / Need by Async requests + # If a correlation token exists, add it to header / Need by Async requests token = request[API_HEADER].get('correlationToken') if token: response[API_EVENT][API_HEADER]['correlationToken'] = token diff --git a/homeassistant/components/android_ip_webcam.py b/homeassistant/components/android_ip_webcam.py index 2883fca9ab6..5fbd5a764e9 100644 --- a/homeassistant/components/android_ip_webcam.py +++ b/homeassistant/components/android_ip_webcam.py @@ -251,7 +251,7 @@ class AndroidIPCamEntity(Entity): """The Android device running IP Webcam.""" def __init__(self, host, ipcam): - """Initialize the data oject.""" + """Initialize the data object.""" self._host = host self._ipcam = ipcam diff --git a/homeassistant/components/apcupsd.py b/homeassistant/components/apcupsd.py index dd29e7d602f..7e2b4cda28f 100644 --- a/homeassistant/components/apcupsd.py +++ b/homeassistant/components/apcupsd.py @@ -66,7 +66,7 @@ class APCUPSdData(object): """ def __init__(self, host, port): - """Initialize the data oject.""" + """Initialize the data object.""" from apcaccess import status self._host = host self._port = port diff --git a/homeassistant/components/arlo.py b/homeassistant/components/arlo.py index a928ed108c9..7e51ec8c045 100644 --- a/homeassistant/components/arlo.py +++ b/homeassistant/components/arlo.py @@ -47,7 +47,7 @@ def setup(hass, config): return False hass.data[DATA_ARLO] = arlo except (ConnectTimeout, HTTPError) as ex: - _LOGGER.error("Unable to connect to Netgar Arlo: %s", str(ex)) + _LOGGER.error("Unable to connect to Netgear Arlo: %s", str(ex)) hass.components.persistent_notification.create( 'Error: {}
' 'You will need to restart hass after fixing.' diff --git a/homeassistant/components/binary_sensor/ffmpeg_motion.py b/homeassistant/components/binary_sensor/ffmpeg_motion.py index 47b1be988bf..75a9fa1d046 100644 --- a/homeassistant/components/binary_sensor/ffmpeg_motion.py +++ b/homeassistant/components/binary_sensor/ffmpeg_motion.py @@ -48,7 +48,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ @asyncio.coroutine def async_setup_platform(hass, config, async_add_devices, discovery_info=None): - """Set up the FFmpeg binary moition sensor.""" + """Set up the FFmpeg binary motion sensor.""" manager = hass.data[DATA_FFMPEG] if not manager.async_run_test(config.get(CONF_INPUT)): diff --git a/homeassistant/components/binary_sensor/hikvision.py b/homeassistant/components/binary_sensor/hikvision.py index df488cc0ed6..3ec70896426 100644 --- a/homeassistant/components/binary_sensor/hikvision.py +++ b/homeassistant/components/binary_sensor/hikvision.py @@ -118,7 +118,7 @@ class HikvisionData(object): """Hikvision device event stream object.""" def __init__(self, hass, url, port, name, username, password): - """Initialize the data oject.""" + """Initialize the data object.""" from pyhik.hikvision import HikCamera self._url = url self._port = port diff --git a/homeassistant/components/binary_sensor/isy994.py b/homeassistant/components/binary_sensor/isy994.py index 89d9b7e5c8f..4dddb9bdbef 100644 --- a/homeassistant/components/binary_sensor/isy994.py +++ b/homeassistant/components/binary_sensor/isy994.py @@ -67,8 +67,8 @@ def setup_platform(hass, config: ConfigType, elif subnode_id == 2: parent_device.add_negative_node(node) elif device_type == 'moisture': - # Moisure nodes have a subnode 2, but we ignore it because it's - # just the inverse of the primary node. + # Moisture nodes have a subnode 2, but we ignore it because + # it's just the inverse of the primary node. if subnode_id == 4: # Heartbeat node device = ISYBinarySensorHeartbeat(node, parent_device) diff --git a/homeassistant/components/binary_sensor/pilight.py b/homeassistant/components/binary_sensor/pilight.py index c4c26d3a122..d2c46c795a8 100644 --- a/homeassistant/components/binary_sensor/pilight.py +++ b/homeassistant/components/binary_sensor/pilight.py @@ -97,7 +97,7 @@ class PilightBinarySensor(BinarySensorDevice): def _handle_code(self, call): """Handle received code by the pilight-daemon. - If the code matches the defined playload + If the code matches the defined payload of this sensor the sensor state is changed accordingly. """ # Check if received code matches defined playoad @@ -162,10 +162,10 @@ class PilightTriggerSensor(BinarySensorDevice): def _handle_code(self, call): """Handle received code by the pilight-daemon. - If the code matches the defined playload + If the code matches the defined payload of this sensor the sensor state is changed accordingly. """ - # Check if received code matches defined playoad + # Check if received code matches defined payload # True if payload is contained in received code dict payload_ok = True for key in self._payload: diff --git a/homeassistant/components/camera/abode.py b/homeassistant/components/camera/abode.py index 3c0c0a54e0e..ee739810a61 100644 --- a/homeassistant/components/camera/abode.py +++ b/homeassistant/components/camera/abode.py @@ -22,7 +22,7 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90) _LOGGER = logging.getLogger(__name__) -def setup_platform(hass, config, add_devices, discoveryy_info=None): +def setup_platform(hass, config, add_devices, discovery_info=None): """Set up Abode camera devices.""" import abodepy.helpers.constants as CONST import abodepy.helpers.timeline as TIMELINE diff --git a/homeassistant/components/camera/rpi_camera.py b/homeassistant/components/camera/rpi_camera.py index 6e3d3622a3f..f37e7778414 100644 --- a/homeassistant/components/camera/rpi_camera.py +++ b/homeassistant/components/camera/rpi_camera.py @@ -28,7 +28,7 @@ CONF_VERTICAL_FLIP = 'vertical_flip' DEFAULT_HORIZONTAL_FLIP = 0 DEFAULT_IMAGE_HEIGHT = 480 -DEFAULT_IMAGE_QUALITIY = 7 +DEFAULT_IMAGE_QUALITY = 7 DEFAULT_IMAGE_ROTATION = 0 DEFAULT_IMAGE_WIDTH = 640 DEFAULT_NAME = 'Raspberry Pi Camera' @@ -41,7 +41,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.All(vol.Coerce(int), vol.Range(min=0, max=1)), vol.Optional(CONF_IMAGE_HEIGHT, default=DEFAULT_IMAGE_HEIGHT): vol.Coerce(int), - vol.Optional(CONF_IMAGE_QUALITY, default=DEFAULT_IMAGE_QUALITIY): + vol.Optional(CONF_IMAGE_QUALITY, default=DEFAULT_IMAGE_QUALITY): vol.All(vol.Coerce(int), vol.Range(min=0, max=100)), vol.Optional(CONF_IMAGE_ROTATION, default=DEFAULT_IMAGE_ROTATION): vol.All(vol.Coerce(int), vol.Range(min=0, max=359)), @@ -131,7 +131,7 @@ class RaspberryCamera(Camera): stderr=subprocess.STDOUT) def camera_image(self): - """Return raspstill image response.""" + """Return raspistill image response.""" with open(self._config[CONF_FILE_PATH], 'rb') as file: return file.read() diff --git a/homeassistant/components/climate/generic_thermostat.py b/homeassistant/components/climate/generic_thermostat.py index 9445fc7cfc9..ba4973aea9e 100644 --- a/homeassistant/components/climate/generic_thermostat.py +++ b/homeassistant/components/climate/generic_thermostat.py @@ -249,7 +249,7 @@ class GenericThermostat(ClimateDevice): else: _LOGGER.error("Unrecognized operation mode: %s", operation_mode) return - # Ensure we updae the current operation after changing the mode + # Ensure we update the current operation after changing the mode self.schedule_update_ha_state() @asyncio.coroutine diff --git a/homeassistant/components/climate/mysensors.py b/homeassistant/components/climate/mysensors.py index ff1400a8fae..5553db70f0d 100644 --- a/homeassistant/components/climate/mysensors.py +++ b/homeassistant/components/climate/mysensors.py @@ -139,8 +139,7 @@ class MySensorsHVAC(mysensors.MySensorsEntity, ClimateDevice): self.gateway.set_child_value( self.node_id, self.child_id, value_type, value) if self.gateway.optimistic: - # O - # ptimistically assume that device has changed state + # Optimistically assume that device has changed state self._values[value_type] = value self.schedule_update_ha_state() diff --git a/homeassistant/components/climate/netatmo.py b/homeassistant/components/climate/netatmo.py index 7155aaf5924..5d54b39e773 100644 --- a/homeassistant/components/climate/netatmo.py +++ b/homeassistant/components/climate/netatmo.py @@ -24,7 +24,7 @@ CONF_RELAY = 'relay' CONF_THERMOSTAT = 'thermostat' DEFAULT_AWAY_TEMPERATURE = 14 -# # The default offeset is 2 hours (when you use the thermostat itself) +# # The default offset is 2 hours (when you use the thermostat itself) DEFAULT_TIME_OFFSET = 7200 # # Return cached results if last scan was less then this time ago # # NetAtmo Data is uploaded to server every hour diff --git a/homeassistant/components/climate/oem.py b/homeassistant/components/climate/oem.py index 0cbdc8f2ce6..59f8db03318 100644 --- a/homeassistant/components/climate/oem.py +++ b/homeassistant/components/climate/oem.py @@ -59,7 +59,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class ThermostatDevice(ClimateDevice): - """Interface class for the oemthermostat modul.""" + """Interface class for the oemthermostat module.""" def __init__(self, hass, thermostat, name, away_temp): """Initialize the device.""" diff --git a/homeassistant/components/cover/homematic.py b/homeassistant/components/cover/homematic.py index 1fa215e5fb9..2736b656a15 100644 --- a/homeassistant/components/cover/homematic.py +++ b/homeassistant/components/cover/homematic.py @@ -68,7 +68,7 @@ class HMCover(HMDevice, CoverDevice): self._hmdevice.stop(self._channel) def _init_data_struct(self): - """Generate a data dictoinary (self._data) from metadata.""" + """Generate a data dictionary (self._data) from metadata.""" self._state = "LEVEL" self._data.update({self._state: STATE_UNKNOWN}) if "LEVEL_2" in self._hmdevice.WRITENODE: diff --git a/homeassistant/components/cover/knx.py b/homeassistant/components/cover/knx.py index 79c57c41e90..a6cd1263a73 100644 --- a/homeassistant/components/cover/knx.py +++ b/homeassistant/components/cover/knx.py @@ -74,7 +74,7 @@ def async_add_devices_discovery(hass, discovery_info, async_add_devices): @callback def async_add_devices_config(hass, config, async_add_devices): - """Set up cover for KNX platform configured within plattform.""" + """Set up cover for KNX platform configured within platform.""" import xknx cover = xknx.devices.Cover( hass.data[DATA_KNX].xknx, diff --git a/homeassistant/components/cover/lutron.py b/homeassistant/components/cover/lutron.py index 08a2ef8c5ad..4e38681a310 100644 --- a/homeassistant/components/cover/lutron.py +++ b/homeassistant/components/cover/lutron.py @@ -63,7 +63,7 @@ class LutronCover(LutronDevice, CoverDevice): def update(self): """Call when forcing a refresh of the device.""" - # Reading the property (rather than last_level()) fetchs value + # Reading the property (rather than last_level()) fetches value level = self._lutron_device.level _LOGGER.debug("Lutron ID: %d updated to %f", self._lutron_device.id, level) diff --git a/homeassistant/components/device_tracker/asuswrt.py b/homeassistant/components/device_tracker/asuswrt.py index 2196dd78fdb..fb47b26a687 100644 --- a/homeassistant/components/device_tracker/asuswrt.py +++ b/homeassistant/components/device_tracker/asuswrt.py @@ -242,7 +242,7 @@ class _Connection: return self._connected def connect(self): - """Mark currenct connection state as connected.""" + """Mark current connection state as connected.""" self._connected = True def disconnect(self): diff --git a/homeassistant/components/device_tracker/huawei_router.py b/homeassistant/components/device_tracker/huawei_router.py index abdd829f26c..357dd0d36cf 100644 --- a/homeassistant/components/device_tracker/huawei_router.py +++ b/homeassistant/components/device_tracker/huawei_router.py @@ -119,7 +119,7 @@ class HuaweiDeviceScanner(DeviceScanner): cnt = requests.post('http://{}/asp/GetRandCount.asp'.format(self.host)) cnt_str = str(cnt.content, cnt.apparent_encoding, errors='replace') - _LOGGER.debug("Loggin in") + _LOGGER.debug("Logging in") cookie = requests.post('http://{}/login.cgi'.format(self.host), data=[('UserName', self.username), ('PassWord', self.password), diff --git a/homeassistant/components/device_tracker/ubus.py b/homeassistant/components/device_tracker/ubus.py index 2306a66070b..dee5044d3a6 100644 --- a/homeassistant/components/device_tracker/ubus.py +++ b/homeassistant/components/device_tracker/ubus.py @@ -46,8 +46,8 @@ def get_scanner(hass, config): return scanner if scanner.success_init else None -def _refresh_on_acccess_denied(func): - """If remove rebooted, it lost our session so rebuld one and try again.""" +def _refresh_on_access_denied(func): + """If remove rebooted, it lost our session so rebuild one and try again.""" def decorator(self, *args, **kwargs): """Wrap the function to refresh session_id on PermissionError.""" try: @@ -95,7 +95,7 @@ class UbusDeviceScanner(DeviceScanner): """Must be implemented depending on the software.""" raise NotImplementedError - @_refresh_on_acccess_denied + @_refresh_on_access_denied def get_device_name(self, mac): """Return the name of the given device or None if we don't know.""" if self.mac2name is None: @@ -104,7 +104,7 @@ class UbusDeviceScanner(DeviceScanner): self.mac2name = None return name - @_refresh_on_acccess_denied + @_refresh_on_access_denied def _update_info(self): """Ensure the information from the router is up to date. diff --git a/homeassistant/components/dominos.py b/homeassistant/components/dominos.py index 0d6645f37c1..4bdb4c80add 100644 --- a/homeassistant/components/dominos.py +++ b/homeassistant/components/dominos.py @@ -1,7 +1,7 @@ """ Support for Dominos Pizza ordering. -The Dominos Pizza component ceates a service which can be invoked to order +The Dominos Pizza component creates a service which can be invoked to order from their menu For more details about this platform, please refer to the documentation at diff --git a/homeassistant/components/downloader.py b/homeassistant/components/downloader.py index d832bbdfdd1..b7354b4f0a7 100644 --- a/homeassistant/components/downloader.py +++ b/homeassistant/components/downloader.py @@ -79,7 +79,7 @@ def setup(hass, config): if req.status_code != 200: _LOGGER.warning( - "downloading '%s' failed, stauts_code=%d", + "downloading '%s' failed, status_code=%d", url, req.status_code) diff --git a/homeassistant/components/eight_sleep.py b/homeassistant/components/eight_sleep.py index 88cbf1bd57b..7ae4ec862bb 100644 --- a/homeassistant/components/eight_sleep.py +++ b/homeassistant/components/eight_sleep.py @@ -193,7 +193,7 @@ class EightSleepUserEntity(Entity): """The Eight Sleep device entity.""" def __init__(self, eight): - """Initialize the data oject.""" + """Initialize the data object.""" self._eight = eight @asyncio.coroutine @@ -217,7 +217,7 @@ class EightSleepHeatEntity(Entity): """The Eight Sleep device entity.""" def __init__(self, eight): - """Initialize the data oject.""" + """Initialize the data object.""" self._eight = eight @asyncio.coroutine diff --git a/homeassistant/components/fan/__init__.py b/homeassistant/components/fan/__init__.py index eccc800319c..6e6d377986d 100644 --- a/homeassistant/components/fan/__init__.py +++ b/homeassistant/components/fan/__init__.py @@ -205,7 +205,7 @@ def async_setup(hass, config: dict): @asyncio.coroutine def async_handle_fan_service(service): - """Hande service call for fans.""" + """Handle service call for fans.""" method = SERVICE_TO_METHOD.get(service.service) params = service.data.copy() diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 2da27b7e544..d699acab25d 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -586,9 +586,9 @@ def _is_latest(js_option, request): family_min_version = { 'Chrome': 50, # Probably can reduce this - 'Firefox': 43, # Array.protopype.includes added in 43 + 'Firefox': 43, # Array.prototype.includes added in 43 'Opera': 40, # Probably can reduce this - 'Edge': 14, # Array.protopype.includes added in 14 + 'Edge': 14, # Array.prototype.includes added in 14 'Safari': 10, # many features not supported by 9 } version = family_min_version.get(useragent.browser.family) diff --git a/homeassistant/components/google.py b/homeassistant/components/google.py index f7923067270..30151ee1a56 100644 --- a/homeassistant/components/google.py +++ b/homeassistant/components/google.py @@ -128,7 +128,7 @@ def do_authentication(hass, config): """Keep trying to validate the user_code until it expires.""" if now >= dt.as_local(dev_flow.user_code_expiry): hass.components.persistent_notification.create( - 'Authenication code expired, please restart ' + 'Authentication code expired, please restart ' 'Home-Assistant and try again', title=NOTIFICATION_TITLE, notification_id=NOTIFICATION_ID) diff --git a/homeassistant/components/google_assistant/smart_home.py b/homeassistant/components/google_assistant/smart_home.py index ba56e7c3837..0cc6f9c3f83 100644 --- a/homeassistant/components/google_assistant/smart_home.py +++ b/homeassistant/components/google_assistant/smart_home.py @@ -429,7 +429,7 @@ def async_devices_query(hass, config, payload): devices = {} for device in payload.get('devices', []): devid = device.get('id') - # In theory this should never happpen + # In theory this should never happen if not devid: _LOGGER.error('Device missing ID: %s', device) continue diff --git a/homeassistant/components/group/__init__.py b/homeassistant/components/group/__init__.py index a8529f18b69..3881b6211c2 100644 --- a/homeassistant/components/group/__init__.py +++ b/homeassistant/components/group/__init__.py @@ -247,7 +247,7 @@ def get_entity_ids(hass, entity_id, domain_filter=None): @asyncio.coroutine def async_setup(hass, config): - """Set up all groups found definded in the configuration.""" + """Set up all groups found defined in the configuration.""" component = hass.data.get(DOMAIN) if component is None: diff --git a/homeassistant/components/homematic/__init__.py b/homeassistant/components/homematic/__init__.py index 70054e54075..33df4bfbd17 100644 --- a/homeassistant/components/homematic/__init__.py +++ b/homeassistant/components/homematic/__init__.py @@ -218,7 +218,7 @@ SCHEMA_SERVICE_SET_INSTALL_MODE = vol.Schema({ @bind_hass def virtualkey(hass, address, channel, param, interface=None): - """Send virtual keypress to homematic controlller.""" + """Send virtual keypress to homematic controller.""" data = { ATTR_ADDRESS: address, ATTR_CHANNEL: channel, @@ -256,7 +256,7 @@ def set_device_value(hass, address, channel, param, value, interface=None): @bind_hass def set_install_mode(hass, interface, mode=None, time=None, address=None): - """Call setInstallMode XML-RPC method of supplied inteface.""" + """Call setInstallMode XML-RPC method of supplied interface.""" data = { key: value for key, value in ( (ATTR_INTERFACE, interface), @@ -665,7 +665,7 @@ class HMHub(Entity): self.schedule_update_ha_state() def _update_variables(self, now): - """Retrive all variable data and update hmvariable states.""" + """Retrieve all variable data and update hmvariable states.""" variables = self._homematic.getAllSystemVariables(self._name) if variables is None: return diff --git a/homeassistant/components/image_processing/microsoft_face_detect.py b/homeassistant/components/image_processing/microsoft_face_detect.py index 40aac61914b..6770ff1bdf6 100644 --- a/homeassistant/components/image_processing/microsoft_face_detect.py +++ b/homeassistant/components/image_processing/microsoft_face_detect.py @@ -36,7 +36,7 @@ def validate_attributes(list_attributes): """Validate face attributes.""" for attr in list_attributes: if attr not in SUPPORTED_ATTRIBUTES: - raise vol.Invalid("Invalid attribtue {0}".format(attr)) + raise vol.Invalid("Invalid attribute {0}".format(attr)) return list_attributes diff --git a/homeassistant/components/image_processing/microsoft_face_identify.py b/homeassistant/components/image_processing/microsoft_face_identify.py index 0cdd1675274..258731326ee 100644 --- a/homeassistant/components/image_processing/microsoft_face_identify.py +++ b/homeassistant/components/image_processing/microsoft_face_identify.py @@ -201,7 +201,7 @@ class MicrosoftFaceIdentifyEntity(ImageProcessingFaceEntity): return # Parse data - knwon_faces = [] + known_faces = [] total = 0 for face in detect: total += 1 @@ -215,9 +215,9 @@ class MicrosoftFaceIdentifyEntity(ImageProcessingFaceEntity): name = s_name break - knwon_faces.append({ + known_faces.append({ ATTR_NAME: name, ATTR_CONFIDENCE: data['confidence'] * 100, }) - self.async_process_faces(knwon_faces, total) + self.async_process_faces(known_faces, total) diff --git a/homeassistant/components/image_processing/seven_segments.py b/homeassistant/components/image_processing/seven_segments.py index 60b2eadee92..1ef8a4bb847 100644 --- a/homeassistant/components/image_processing/seven_segments.py +++ b/homeassistant/components/image_processing/seven_segments.py @@ -66,7 +66,7 @@ class ImageProcessingSsocr(ImageProcessingEntity): if name: self._name = name else: - self._name = "SevenSegement OCR {0}".format( + self._name = "SevenSegment OCR {0}".format( split_entity_id(camera_entity)[1]) self._state = None diff --git a/homeassistant/components/input_boolean.py b/homeassistant/components/input_boolean.py index 43feeb8c4f4..56761b5af4e 100644 --- a/homeassistant/components/input_boolean.py +++ b/homeassistant/components/input_boolean.py @@ -137,7 +137,7 @@ class InputBoolean(ToggleEntity): @property def icon(self): - """Returh the icon to be used for this entity.""" + """Return the icon to be used for this entity.""" return self._icon @property diff --git a/homeassistant/components/ios.py b/homeassistant/components/ios.py index ebabcdb0e79..5e2528d2f0d 100644 --- a/homeassistant/components/ios.py +++ b/homeassistant/components/ios.py @@ -72,7 +72,7 @@ ATTR_DEVICE_SYSTEM_VERSION = 'systemVersion' ATTR_DEVICE_TYPE = 'type' ATTR_DEVICE_SYSTEM_NAME = 'systemName' -ATTR_APP_BUNDLE_IDENTIFER = 'bundleIdentifer' +ATTR_APP_BUNDLE_IDENTIFIER = 'bundleIdentifier' ATTR_APP_BUILD_NUMBER = 'buildNumber' ATTR_APP_VERSION_NUMBER = 'versionNumber' @@ -136,7 +136,7 @@ IDENTIFY_DEVICE_SCHEMA = vol.Schema({ IDENTIFY_DEVICE_SCHEMA_CONTAINER = vol.All(dict, IDENTIFY_DEVICE_SCHEMA) IDENTIFY_APP_SCHEMA = vol.Schema({ - vol.Required(ATTR_APP_BUNDLE_IDENTIFER): cv.string, + vol.Required(ATTR_APP_BUNDLE_IDENTIFIER): cv.string, vol.Required(ATTR_APP_BUILD_NUMBER): cv.positive_int, vol.Optional(ATTR_APP_VERSION_NUMBER): cv.string }, extra=vol.ALLOW_EXTRA) diff --git a/homeassistant/components/isy994.py b/homeassistant/components/isy994.py index 28cfac39154..d85883e472a 100644 --- a/homeassistant/components/isy994.py +++ b/homeassistant/components/isy994.py @@ -123,7 +123,7 @@ SUPPORTED_DOMAINS = ['binary_sensor', 'sensor', 'lock', 'fan', 'cover', 'light', 'switch'] SUPPORTED_PROGRAM_DOMAINS = ['binary_sensor', 'lock', 'fan', 'cover', 'switch'] -# ISY Scenes are more like Swithes than Hass Scenes +# ISY Scenes are more like Switches than Hass Scenes # (they can turn off, and report their state) SCENE_DOMAIN = 'switch' diff --git a/homeassistant/components/light/__init__.py b/homeassistant/components/light/__init__.py index b761b04c705..cfeceb0c991 100644 --- a/homeassistant/components/light/__init__.py +++ b/homeassistant/components/light/__init__.py @@ -254,7 +254,7 @@ def async_setup(hass, config): @asyncio.coroutine def async_handle_light_service(service): - """Hande a turn light on or off service call.""" + """Handle a turn light on or off service call.""" # Get the validated data params = service.data.copy() diff --git a/homeassistant/components/light/decora.py b/homeassistant/components/light/decora.py index 6d502e15d6f..3b6b22faba9 100644 --- a/homeassistant/components/light/decora.py +++ b/homeassistant/components/light/decora.py @@ -35,7 +35,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def retry(method): """Retry bluetooth commands.""" @wraps(method) - def wrapper_retry(device, *args, **kwds): + def wrapper_retry(device, *args, **kwargs): """Try send command and retry on error.""" # pylint: disable=import-error import decora @@ -46,7 +46,7 @@ def retry(method): if time.monotonic() - initial >= 10: return None try: - return method(device, *args, **kwds) + return method(device, *args, **kwargs) except (decora.decoraException, AttributeError, bluepy.btle.BTLEException): _LOGGER.warning("Decora connect error for device %s. " diff --git a/homeassistant/components/light/flux_led.py b/homeassistant/components/light/flux_led.py index c48de4deaf8..396ddc984fa 100644 --- a/homeassistant/components/light/flux_led.py +++ b/homeassistant/components/light/flux_led.py @@ -46,7 +46,7 @@ EFFECT_GREEN_BLUE_CROSS_FADE = 'gb_cross_fade' EFFECT_COLORSTROBE = 'colorstrobe' EFFECT_RED_STROBE = 'red_strobe' EFFECT_GREEN_STROBE = 'green_strobe' -EFFECT_BLUE_STOBE = 'blue_strobe' +EFFECT_BLUE_STROBE = 'blue_strobe' EFFECT_YELLOW_STROBE = 'yellow_strobe' EFFECT_CYAN_STROBE = 'cyan_strobe' EFFECT_PURPLE_STROBE = 'purple_strobe' @@ -68,7 +68,7 @@ EFFECT_MAP = { EFFECT_COLORSTROBE: 0x30, EFFECT_RED_STROBE: 0x31, EFFECT_GREEN_STROBE: 0x32, - EFFECT_BLUE_STOBE: 0x33, + EFFECT_BLUE_STROBE: 0x33, EFFECT_YELLOW_STROBE: 0x34, EFFECT_CYAN_STROBE: 0x35, EFFECT_PURPLE_STROBE: 0x36, diff --git a/homeassistant/components/light/homematic.py b/homeassistant/components/light/homematic.py index 807c19fffdb..a3db1ff30ff 100644 --- a/homeassistant/components/light/homematic.py +++ b/homeassistant/components/light/homematic.py @@ -1,5 +1,5 @@ """ -Support for Homematic lighs. +Support for Homematic lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.homematic/ diff --git a/homeassistant/components/light/iglo.py b/homeassistant/components/light/iglo.py index a2eed36a089..ba78546cf77 100644 --- a/homeassistant/components/light/iglo.py +++ b/homeassistant/components/light/iglo.py @@ -31,7 +31,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Set up the iGlo lighs.""" + """Set up the iGlo lights.""" host = config.get(CONF_HOST) name = config.get(CONF_NAME) port = config.get(CONF_PORT) diff --git a/homeassistant/components/light/isy994.py b/homeassistant/components/light/isy994.py index a6191b05c7c..cee8155c322 100644 --- a/homeassistant/components/light/isy994.py +++ b/homeassistant/components/light/isy994.py @@ -27,7 +27,7 @@ def setup_platform(hass, config: ConfigType, class ISYLightDevice(ISYDevice, Light): - """Representation of an ISY994 light devie.""" + """Representation of an ISY994 light device.""" def __init__(self, node: object) -> None: """Initialize the ISY994 light device.""" diff --git a/homeassistant/components/light/knx.py b/homeassistant/components/light/knx.py index 732cfe2a644..8c9e78ab2b0 100644 --- a/homeassistant/components/light/knx.py +++ b/homeassistant/components/light/knx.py @@ -57,7 +57,7 @@ def async_add_devices_discovery(hass, discovery_info, async_add_devices): @callback def async_add_devices_config(hass, config, async_add_devices): - """Set up light for KNX platform configured within plattform.""" + """Set up light for KNX platform configured within platform.""" import xknx light = xknx.devices.Light( hass.data[DATA_KNX].xknx, diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py index 1dc0861d737..9e1e2e54ad9 100644 --- a/homeassistant/components/logbook.py +++ b/homeassistant/components/logbook.py @@ -116,7 +116,7 @@ class LogbookView(HomeAssistantView): extra_urls = ['/api/logbook/{datetime}'] def __init__(self, config): - """Initilalize the logbook view.""" + """Initialize the logbook view.""" self.config = config @asyncio.coroutine diff --git a/homeassistant/components/logger.py b/homeassistant/components/logger.py index 21898f7b16d..c2309401977 100644 --- a/homeassistant/components/logger.py +++ b/homeassistant/components/logger.py @@ -93,7 +93,7 @@ def async_setup(hass, config): if LOGGER_LOGS in logfilter: logs.update(logfilter[LOGGER_LOGS]) - # Add new logpoints mapped to correc severity + # Add new logpoints mapped to correct severity for key, value in logpoints.items(): logs[key] = LOGSEVERITY[value] diff --git a/homeassistant/components/mailbox/asterisk_mbox.py b/homeassistant/components/mailbox/asterisk_mbox.py index a1953839f4f..2e807058edf 100644 --- a/homeassistant/components/mailbox/asterisk_mbox.py +++ b/homeassistant/components/mailbox/asterisk_mbox.py @@ -30,7 +30,7 @@ class AsteriskMailbox(Mailbox): """Asterisk VM Sensor.""" def __init__(self, hass, name): - """Initialie Asterisk mailbox.""" + """Initialize Asterisk mailbox.""" super().__init__(hass, name) async_dispatcher_connect( self.hass, SIGNAL_MESSAGE_UPDATE, self._update_callback) diff --git a/homeassistant/components/media_player/bluesound.py b/homeassistant/components/media_player/bluesound.py index d8a0cd7ebf9..848c6abe91f 100644 --- a/homeassistant/components/media_player/bluesound.py +++ b/homeassistant/components/media_player/bluesound.py @@ -122,7 +122,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): class BluesoundPlayer(MediaPlayerDevice): - """Represenatation of a Bluesound Player.""" + """Representation of a Bluesound Player.""" def __init__(self, hass, host, port=None, name=None, init_callback=None): """Initialize the media player.""" @@ -338,7 +338,7 @@ class BluesoundPlayer(MediaPlayerDevice): @asyncio.coroutine @Throttle(UPDATE_CAPTURE_INTERVAL) def async_update_captures(self): - """Update Capture cources.""" + """Update Capture sources.""" resp = yield from self.send_bluesound_command( 'RadioBrowse?service=Capture') if not resp: diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py index 2aaff646885..928062cb2dc 100644 --- a/homeassistant/components/media_player/cast.py +++ b/homeassistant/components/media_player/cast.py @@ -205,7 +205,7 @@ class CastDevice(MediaPlayerDevice): @property def media_album_artist(self): - """Album arist of current playing media (Music track only).""" + """Album artist of current playing media (Music track only).""" return self.media_status.album_artist if self.media_status else None @property diff --git a/homeassistant/components/media_player/emby.py b/homeassistant/components/media_player/emby.py index ebb8a670488..35d3ed35095 100644 --- a/homeassistant/components/media_player/emby.py +++ b/homeassistant/components/media_player/emby.py @@ -273,7 +273,7 @@ class EmbyDevice(MediaPlayerDevice): @property def media_season(self): - """Season of curent playing media (TV Show only).""" + """Season of current playing media (TV Show only).""" return self.device.media_season @property diff --git a/homeassistant/components/media_player/hdmi_cec.py b/homeassistant/components/media_player/hdmi_cec.py index 03e7c6f0c9f..e1fffefed18 100644 --- a/homeassistant/components/media_player/hdmi_cec.py +++ b/homeassistant/components/media_player/hdmi_cec.py @@ -32,7 +32,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class CecPlayerDevice(CecDevice, MediaPlayerDevice): - """Representation of a HDMI device as a Media palyer.""" + """Representation of a HDMI device as a Media player.""" def __init__(self, hass: HomeAssistant, device, logical) -> None: """Initialize the HDMI device.""" diff --git a/homeassistant/components/media_player/squeezebox.py b/homeassistant/components/media_player/squeezebox.py index 82bd106af8d..769c8951dc8 100644 --- a/homeassistant/components/media_player/squeezebox.py +++ b/homeassistant/components/media_player/squeezebox.py @@ -45,7 +45,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ SERVICE_CALL_METHOD = 'squeezebox_call_method' -DATA_SQUEEZEBOX = 'squeexebox' +DATA_SQUEEZEBOX = 'squeezebox' ATTR_PARAMETERS = 'parameters' diff --git a/homeassistant/components/media_player/volumio.py b/homeassistant/components/media_player/volumio.py index eda0bc2b326..dab7901111d 100644 --- a/homeassistant/components/media_player/volumio.py +++ b/homeassistant/components/media_player/volumio.py @@ -203,7 +203,7 @@ class Volumio(MediaPlayerDevice): """Send mute command to media player.""" mutecmd = 'mute' if mute else 'unmute' if mute: - # mute is implemenhted as 0 volume, do save last volume level + # mute is implemented as 0 volume, do save last volume level self._lastvol = self._state['volume'] return self.send_volumio_msg( 'commands', params={'cmd': 'volume', 'volume': mutecmd}) diff --git a/homeassistant/components/media_player/yamaha.py b/homeassistant/components/media_player/yamaha.py index 577988bc58c..8e4729a4409 100644 --- a/homeassistant/components/media_player/yamaha.py +++ b/homeassistant/components/media_player/yamaha.py @@ -310,7 +310,7 @@ class YamahaDevice(MediaPlayerDevice): NOTE: this might take a while, because the only API interface for setting the net radio station emulates button pressing and - navigating through the net radio menu hiearchy. And each sub + navigating through the net radio menu hierarchy. And each sub menu must be fetched by the receiver from the vtuner service. """ diff --git a/homeassistant/components/mysensors.py b/homeassistant/components/mysensors.py index 91053b41bf6..390da7ed0e0 100644 --- a/homeassistant/components/mysensors.py +++ b/homeassistant/components/mysensors.py @@ -76,12 +76,12 @@ def is_socket_address(value): def has_parent_dir(value): - """Validate that value is in an existing directory which is writetable.""" + """Validate that value is in an existing directory which is writeable.""" parent = os.path.dirname(os.path.realpath(value)) is_dir_writable = os.path.isdir(parent) and os.access(parent, os.W_OK) if not is_dir_writable: raise vol.Invalid( - '{} directory does not exist or is not writetable'.format(parent)) + '{} directory does not exist or is not writeable'.format(parent)) return value diff --git a/homeassistant/components/nest.py b/homeassistant/components/nest.py index 512819b7e74..37028decf71 100644 --- a/homeassistant/components/nest.py +++ b/homeassistant/components/nest.py @@ -183,7 +183,7 @@ class NestDevice(object): "Connection error logging into the nest web service.") def smoke_co_alarms(self): - """Generate a list of smoke co alarams.""" + """Generate a list of smoke co alarms.""" try: for structure in self.nest.structures: if structure.name in self.local_structure: diff --git a/homeassistant/components/notify/knx.py b/homeassistant/components/notify/knx.py index c5dbcb0d4ad..d14d8dcf8ad 100644 --- a/homeassistant/components/notify/knx.py +++ b/homeassistant/components/notify/knx.py @@ -51,7 +51,7 @@ def async_get_service_discovery(hass, discovery_info): @callback def async_get_service_config(hass, config): - """Set up notification for KNX platform configured within plattform.""" + """Set up notification for KNX platform configured within platform.""" import xknx notification = xknx.devices.Notification( hass.data[DATA_KNX].xknx, diff --git a/homeassistant/components/qwikswitch.py b/homeassistant/components/qwikswitch.py index d5d6f657bc6..4d5f27082de 100644 --- a/homeassistant/components/qwikswitch.py +++ b/homeassistant/components/qwikswitch.py @@ -171,7 +171,7 @@ def setup(hass, config): def qs_callback(item): """Typically a button press or update signal.""" if qsusb is None: # Shutting down - _LOGGER.info("Botton press or updating signal done") + _LOGGER.info("Button press or updating signal done") return # If button pressed, fire a hass event diff --git a/homeassistant/components/rainbird.py b/homeassistant/components/rainbird.py index 882731d4f2c..76dda6fd366 100644 --- a/homeassistant/components/rainbird.py +++ b/homeassistant/components/rainbird.py @@ -27,7 +27,7 @@ CONFIG_SCHEMA = vol.Schema({ def setup(hass, config): - """Set up the Rain Bird componenent.""" + """Set up the Rain Bird component.""" conf = config[DOMAIN] server = conf.get(CONF_HOST) password = conf.get(CONF_PASSWORD) @@ -38,8 +38,8 @@ def setup(hass, config): _LOGGER.debug("Rain Bird Controller set to: %s", server) - initialstatus = controller.currentIrrigation() - if initialstatus == -1: + initial_status = controller.currentIrrigation() + if initial_status == -1: _LOGGER.error("Error getting state. Possible configuration issues") return False diff --git a/homeassistant/components/remote/kira.py b/homeassistant/components/remote/kira.py index 7a04949dbeb..42d4ce77054 100644 --- a/homeassistant/components/remote/kira.py +++ b/homeassistant/components/remote/kira.py @@ -48,8 +48,8 @@ class KiraRemote(Entity): def send_command(self, command, **kwargs): """Send a command to one device.""" - for singel_command in command: - code_tuple = (singel_command, + for single_command in command: + code_tuple = (single_command, kwargs.get(remote.ATTR_DEVICE)) _LOGGER.info("Sending Command: %s to %s", *code_tuple) self._kira.sendCode(code_tuple) diff --git a/homeassistant/components/rfxtrx.py b/homeassistant/components/rfxtrx.py index 7d2e428c56b..27bfd1abfbe 100644 --- a/homeassistant/components/rfxtrx.py +++ b/homeassistant/components/rfxtrx.py @@ -77,7 +77,7 @@ def setup(hass, config): """Set up the RFXtrx component.""" # Declare the Handle event def handle_receive(event): - """Handle revieved messages from RFXtrx gateway.""" + """Handle received messages from RFXtrx gateway.""" # Log RFXCOM event if not event.device.id_string: return diff --git a/homeassistant/components/scsgate.py b/homeassistant/components/scsgate.py index 8c5c6570515..a7193b40949 100644 --- a/homeassistant/components/scsgate.py +++ b/homeassistant/components/scsgate.py @@ -87,7 +87,7 @@ class SCSGate(object): self._logger.debug("Received message {}".format(message)) if not isinstance(message, StateMessage) and \ not isinstance(message, ScenarioTriggeredMessage): - msg = "Ignored message {} - not releavant type".format( + msg = "Ignored message {} - not relevant type".format( message) self._logger.debug(msg) return @@ -109,7 +109,7 @@ class SCSGate(object): self._logger.error(msg) else: self._logger.info( - "Ignoring state message for device {} because unknonw".format( + "Ignoring state message for device {} because unknown".format( message.entity)) @property diff --git a/homeassistant/components/sensor/bme680.py b/homeassistant/components/sensor/bme680.py index 081dc6cdc6e..470d7749ea2 100644 --- a/homeassistant/components/sensor/bme680.py +++ b/homeassistant/components/sensor/bme680.py @@ -1,7 +1,7 @@ """ Support for BME680 Sensor over SMBus. -Temperature, humidity, pressure and volitile gas support. +Temperature, humidity, pressure and volatile gas support. Air Quality calculation based on humidity and volatile gas. For more details about this platform, please refer to the documentation at diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 1c12799549c..32c888bad3b 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -87,7 +87,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): async_add_devices(devices) def update_entities_telegram(telegram): - """Update entities with latests telegram and trigger state update.""" + """Update entities with latest telegram and trigger state update.""" # Make all device entities aware of new telegram for device in devices: device.telegram = telegram @@ -122,7 +122,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): if transport: # Register listener to close transport on HA shutdown - stop_listerer = hass.bus.async_listen_once( + stop_listener = hass.bus.async_listen_once( EVENT_HOMEASSISTANT_STOP, transport.close) # Wait for reader to close @@ -131,8 +131,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): if hass.state != CoreState.stopping: # Unexpected disconnect if transport: - # remove listerer - stop_listerer() + # remove listener + stop_listener() # Reflect disconnect state in devices state by setting an # empty telegram resulting in `unknown` states diff --git a/homeassistant/components/sensor/ebox.py b/homeassistant/components/sensor/ebox.py index 27d4bdd2f5a..eee959fceba 100644 --- a/homeassistant/components/sensor/ebox.py +++ b/homeassistant/components/sensor/ebox.py @@ -70,7 +70,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): ebox_data = EBoxData(username, password) ebox_data.update() except requests.exceptions.HTTPError as error: - _LOGGER.error("Failt login: %s", error) + _LOGGER.error("Failed login: %s", error) return False name = config.get(CONF_NAME) diff --git a/homeassistant/components/sensor/emoncms.py b/homeassistant/components/sensor/emoncms.py index fc1daf151c7..cd02137f4d5 100644 --- a/homeassistant/components/sensor/emoncms.py +++ b/homeassistant/components/sensor/emoncms.py @@ -153,7 +153,7 @@ class EmonCmsSensor(Entity): @property def device_state_attributes(self): - """Return the atrributes of the sensor.""" + """Return the attributes of the sensor.""" return { ATTR_FEEDID: self._elem["id"], ATTR_TAG: self._elem["tag"], diff --git a/homeassistant/components/sensor/fido.py b/homeassistant/components/sensor/fido.py index 07c085cd18d..4fc79745b99 100644 --- a/homeassistant/components/sensor/fido.py +++ b/homeassistant/components/sensor/fido.py @@ -50,12 +50,12 @@ SENSOR_TYPES = { 'text_int_used': ['International text used', MESSAGES, 'mdi:message-alert'], 'text_int_limit': ['International text limit', - MESSAGES, 'mdi:message-alart'], - 'text_int_remaining': ['Internaltional remaining', + MESSAGES, 'mdi:message-alert'], + 'text_int_remaining': ['International remaining', MESSAGES, 'mdi:message-alert'], 'talk_used': ['Talk used', MINUTES, 'mdi:cellphone'], 'talk_limit': ['Talk limit', MINUTES, 'mdi:cellphone'], - 'talt_remaining': ['Talk remaining', MINUTES, 'mdi:cellphone'], + 'talk_remaining': ['Talk remaining', MINUTES, 'mdi:cellphone'], 'other_talk_used': ['Other Talk used', MINUTES, 'mdi:cellphone'], 'other_talk_limit': ['Other Talk limit', MINUTES, 'mdi:cellphone'], 'other_talk_remaining': ['Other Talk remaining', MINUTES, 'mdi:cellphone'], diff --git a/homeassistant/components/sensor/knx.py b/homeassistant/components/sensor/knx.py index 0a455099597..70afa6fe1e1 100644 --- a/homeassistant/components/sensor/knx.py +++ b/homeassistant/components/sensor/knx.py @@ -52,7 +52,7 @@ def async_add_devices_discovery(hass, discovery_info, async_add_devices): @callback def async_add_devices_config(hass, config, async_add_devices): - """Set up sensor for KNX platform configured within plattform.""" + """Set up sensor for KNX platform configured within platform.""" import xknx sensor = xknx.devices.Sensor( hass.data[DATA_KNX].xknx, diff --git a/homeassistant/components/sensor/metoffice.py b/homeassistant/components/sensor/metoffice.py index 772e59f266e..b6366de6432 100644 --- a/homeassistant/components/sensor/metoffice.py +++ b/homeassistant/components/sensor/metoffice.py @@ -47,7 +47,7 @@ CONDITION_CLASSES = { DEFAULT_NAME = "Met Office" -VISIBILTY_CLASSES = { +VISIBILITY_CLASSES = { 'VP': '<1', 'PO': '1-4', 'MO': '4-10', @@ -144,7 +144,7 @@ class MetOfficeCurrentSensor(Entity): """Return the state of the sensor.""" if (self._condition == 'visibility_distance' and hasattr(self.data.data, 'visibility')): - return VISIBILTY_CLASSES.get(self.data.data.visibility.value) + return VISIBILITY_CLASSES.get(self.data.data.visibility.value) if hasattr(self.data.data, self._condition): variable = getattr(self.data.data, self._condition) if self._condition == 'weather': diff --git a/homeassistant/components/sensor/modem_callerid.py b/homeassistant/components/sensor/modem_callerid.py index 0b71540f346..f80ea5853c8 100644 --- a/homeassistant/components/sensor/modem_callerid.py +++ b/homeassistant/components/sensor/modem_callerid.py @@ -18,7 +18,7 @@ REQUIREMENTS = ['basicmodem==0.7'] _LOGGER = logging.getLogger(__name__) DEFAULT_NAME = 'Modem CallerID' -ICON = 'mdi:phone-clasic' +ICON = 'mdi:phone-classic' DEFAULT_DEVICE = '/dev/ttyACM0' STATE_RING = 'ring' diff --git a/homeassistant/components/sensor/nut.py b/homeassistant/components/sensor/nut.py index 2228a8eab60..a9fb3ae7a6f 100644 --- a/homeassistant/components/sensor/nut.py +++ b/homeassistant/components/sensor/nut.py @@ -243,7 +243,7 @@ class PyNUTData(object): """ def __init__(self, host, port, alias, username, password): - """Initialize the data oject.""" + """Initialize the data object.""" from pynut2.nut2 import PyNUTClient, PyNUTError self._host = host self._port = port diff --git a/homeassistant/components/sensor/openevse.py b/homeassistant/components/sensor/openevse.py index 6ded982eea1..9086f37f8b2 100644 --- a/homeassistant/components/sensor/openevse.py +++ b/homeassistant/components/sensor/openevse.py @@ -22,7 +22,7 @@ _LOGGER = logging.getLogger(__name__) SENSOR_TYPES = { 'status': ['Charging Status', None], 'charge_time': ['Charge Time Elapsed', 'minutes'], - 'ambient_temp': ['Ambient Termperature', TEMP_CELSIUS], + 'ambient_temp': ['Ambient Temperature', TEMP_CELSIUS], 'ir_temp': ['IR Temperature', TEMP_CELSIUS], 'rtc_temp': ['RTC Temperature', TEMP_CELSIUS], 'usage_session': ['Usage this Session', 'kWh'], diff --git a/homeassistant/components/sensor/pilight.py b/homeassistant/components/sensor/pilight.py index 86ca496eb62..5b5385f14ef 100644 --- a/homeassistant/components/sensor/pilight.py +++ b/homeassistant/components/sensor/pilight.py @@ -79,10 +79,10 @@ class PilightSensor(Entity): def _handle_code(self, call): """Handle received code by the pilight-daemon. - If the code matches the defined playload + If the code matches the defined payload of this sensor the sensor state is changed accordingly. """ - # Check if received code matches defined playoad + # Check if received code matches defined payload # True if payload is contained in received code dict, not # all items have to match if self._payload.items() <= call.data.items(): diff --git a/homeassistant/components/sensor/pushbullet.py b/homeassistant/components/sensor/pushbullet.py index 086698b06bf..415174ac273 100644 --- a/homeassistant/components/sensor/pushbullet.py +++ b/homeassistant/components/sensor/pushbullet.py @@ -38,7 +38,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Set up the Pushbllet Sensor platform.""" + """Set up the Pushbullet Sensor platform.""" from pushbullet import PushBullet from pushbullet import InvalidKeyError try: diff --git a/homeassistant/components/sensor/statistics.py b/homeassistant/components/sensor/statistics.py index 19281d36d88..46c714d0dbf 100644 --- a/homeassistant/components/sensor/statistics.py +++ b/homeassistant/components/sensor/statistics.py @@ -91,7 +91,7 @@ class StatisticsSensor(Entity): if 'recorder' in self._hass.config.components: # only use the database if it's configured - hass.async_add_job(self._initzialize_from_database) + hass.async_add_job(self._initialize_from_database) @callback # pylint: disable=invalid-name @@ -202,7 +202,7 @@ class StatisticsSensor(Entity): self.average_change = self.change = STATE_UNKNOWN @asyncio.coroutine - def _initzialize_from_database(self): + def _initialize_from_database(self): """Initialize the list of states from the database. The query will get the list of states in DESCENDING order so that we diff --git a/homeassistant/components/sensor/ted5000.py b/homeassistant/components/sensor/ted5000.py index 08681fd37f2..55d520cf6ca 100644 --- a/homeassistant/components/sensor/ted5000.py +++ b/homeassistant/components/sensor/ted5000.py @@ -1,5 +1,5 @@ """ -Support gahtering ted500 information. +Support gathering ted500 information. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.ted5000/ diff --git a/homeassistant/components/sensor/travisci.py b/homeassistant/components/sensor/travisci.py index 5f341760bb6..1ca08e7c0aa 100644 --- a/homeassistant/components/sensor/travisci.py +++ b/homeassistant/components/sensor/travisci.py @@ -79,7 +79,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sensors = [] - # non specificy repository selected, then show all associated + # non specific repository selected, then show all associated if not repositories: all_repos = travis.repos(member=user.login) repositories = [repo.slug for repo in all_repos] diff --git a/homeassistant/components/sensor/uk_transport.py b/homeassistant/components/sensor/uk_transport.py index 9b35afb418c..72d34411d5c 100644 --- a/homeassistant/components/sensor/uk_transport.py +++ b/homeassistant/components/sensor/uk_transport.py @@ -132,7 +132,7 @@ class UkTransportSensor(Entity): _LOGGER.warning('Invalid response from API') elif 'error' in response.json(): if 'exceeded' in response.json()['error']: - self._state = 'Useage limites exceeded' + self._state = 'Usage limits exceeded' if 'invalid' in response.json()['error']: self._state = 'Credentials invalid' else: diff --git a/homeassistant/components/sensor/waqi.py b/homeassistant/components/sensor/waqi.py index 318a22cfa2a..bf2e263a0bb 100644 --- a/homeassistant/components/sensor/waqi.py +++ b/homeassistant/components/sensor/waqi.py @@ -84,7 +84,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): dev.append(waqi_sensor) except (aiohttp.client_exceptions.ClientConnectorError, asyncio.TimeoutError): - _LOGGER.exception('Failed to connct to WAQI servers.') + _LOGGER.exception('Failed to connect to WAQI servers.') raise PlatformNotReady async_add_devices(dev, True) diff --git a/homeassistant/components/sensor/wunderground.py b/homeassistant/components/sensor/wunderground.py index 8bb449b2ec1..d0d9758c13a 100644 --- a/homeassistant/components/sensor/wunderground.py +++ b/homeassistant/components/sensor/wunderground.py @@ -55,7 +55,7 @@ class WUSensorConfig(object): https://www.wunderground.com/weather/api/d/docs?d=data/index value (function(WUndergroundData)): callback that extracts desired value from WUndergroundData object - unit_of_measurement (string): unit of meassurement + unit_of_measurement (string): unit of measurement entity_picture (string): value or callback returning URL of entity picture icon (string): icon name or URL @@ -84,7 +84,7 @@ class WUCurrentConditionsSensorConfig(WUSensorConfig): dictionary. icon (string): icon name or URL, if None sensor will use current weather symbol - unit_of_measurement (string): unit of meassurement + unit_of_measurement (string): unit of measurement """ super().__init__( friendly_name, @@ -230,7 +230,7 @@ class WUAlmanacSensorConfig(WUSensorConfig): value_type (string): "record" or "normal" wu_unit (string): unit name in WU API icon (string): icon name or URL - unit_of_measurement (string): unit of meassurement + unit_of_measurement (string): unit of measurement """ super().__init__( friendly_name=friendly_name, diff --git a/homeassistant/components/sensor/zamg.py b/homeassistant/components/sensor/zamg.py index 4b63d769243..df5ff5e8d37 100644 --- a/homeassistant/components/sensor/zamg.py +++ b/homeassistant/components/sensor/zamg.py @@ -236,7 +236,7 @@ def closest_station(lat, lon, cache_dir): stations = zamg_stations(cache_dir) def comparable_dist(zamg_id): - """Calculate the psudeo-distance from lat/lon.""" + """Calculate the pseudo-distance from lat/lon.""" station_lat, station_lon = stations[zamg_id] return (lat - station_lat) ** 2 + (lon - station_lon) ** 2 diff --git a/homeassistant/components/shopping_list.py b/homeassistant/components/shopping_list.py index 8ec023057d1..31259325c04 100644 --- a/homeassistant/components/shopping_list.py +++ b/homeassistant/components/shopping_list.py @@ -1,4 +1,4 @@ -"""Component to manage a shoppling list.""" +"""Component to manage a shopping list.""" import asyncio import json import logging diff --git a/homeassistant/components/snips.py b/homeassistant/components/snips.py index 5c35e43881e..d085b1279cb 100644 --- a/homeassistant/components/snips.py +++ b/homeassistant/components/snips.py @@ -155,7 +155,7 @@ def async_setup(hass, config): def resolve_slot_values(slot): - """Convert snips builtin types to useable values.""" + """Convert snips builtin types to usable values.""" if 'value' in slot['value']: value = slot['value']['value'] else: diff --git a/homeassistant/components/switch/acer_projector.py b/homeassistant/components/switch/acer_projector.py index d32c0610b66..8fd70ec7ed8 100644 --- a/homeassistant/components/switch/acer_projector.py +++ b/homeassistant/components/switch/acer_projector.py @@ -103,13 +103,13 @@ class AcerSwitch(SwitchDevice): # need to wait for timeout ret = self.ser.read_until(size=20).decode('utf-8') except serial.SerialException: - _LOGGER.error('Problem comunicating with %s', self._serial_port) + _LOGGER.error('Problem communicating with %s', self._serial_port) self.ser.close() return ret def _write_read_format(self, msg): - """Write msg, obtain awnser and format output.""" - # awnsers are formatted as ***\rawnser\r*** + """Write msg, obtain answer and format output.""" + # answers are formatted as ***\answer\r*** awns = self._write_read(msg) match = re.search(r'\r(.+)\r', awns) if match: diff --git a/homeassistant/components/switch/flux.py b/homeassistant/components/switch/flux.py index 7e3566f17b0..a6c57656767 100644 --- a/homeassistant/components/switch/flux.py +++ b/homeassistant/components/switch/flux.py @@ -33,7 +33,7 @@ CONF_START_CT = 'start_colortemp' CONF_SUNSET_CT = 'sunset_colortemp' CONF_STOP_CT = 'stop_colortemp' CONF_BRIGHTNESS = 'brightness' -CONF_DISABLE_BRIGTNESS_ADJUST = 'disable_brightness_adjust' +CONF_DISABLE_BRIGHTNESS_ADJUST = 'disable_brightness_adjust' CONF_INTERVAL = 'interval' MODE_XY = 'xy' @@ -57,7 +57,7 @@ PLATFORM_SCHEMA = vol.Schema({ vol.All(vol.Coerce(int), vol.Range(min=1000, max=40000)), vol.Optional(CONF_BRIGHTNESS): vol.All(vol.Coerce(int), vol.Range(min=0, max=255)), - vol.Optional(CONF_DISABLE_BRIGTNESS_ADJUST): cv.boolean, + vol.Optional(CONF_DISABLE_BRIGHTNESS_ADJUST): cv.boolean, vol.Optional(CONF_MODE, default=DEFAULT_MODE): vol.Any(MODE_XY, MODE_MIRED, MODE_RGB), vol.Optional(CONF_INTERVAL, default=30): cv.positive_int, @@ -105,7 +105,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sunset_colortemp = config.get(CONF_SUNSET_CT) stop_colortemp = config.get(CONF_STOP_CT) brightness = config.get(CONF_BRIGHTNESS) - disable_brightness_adjust = config.get(CONF_DISABLE_BRIGTNESS_ADJUST) + disable_brightness_adjust = config.get(CONF_DISABLE_BRIGHTNESS_ADJUST) mode = config.get(CONF_MODE) interval = config.get(CONF_INTERVAL) transition = config.get(ATTR_TRANSITION) diff --git a/homeassistant/components/switch/knx.py b/homeassistant/components/switch/knx.py index e0b656aafe9..01c08767ca0 100644 --- a/homeassistant/components/switch/knx.py +++ b/homeassistant/components/switch/knx.py @@ -51,7 +51,7 @@ def async_add_devices_discovery(hass, discovery_info, async_add_devices): @callback def async_add_devices_config(hass, config, async_add_devices): - """Set up switch for KNX platform configured within plattform.""" + """Set up switch for KNX platform configured within platform.""" import xknx switch = xknx.devices.Switch( hass.data[DATA_KNX].xknx, diff --git a/homeassistant/components/switch/neato.py b/homeassistant/components/switch/neato.py index 62bc5f99d01..a797abb47fc 100644 --- a/homeassistant/components/switch/neato.py +++ b/homeassistant/components/switch/neato.py @@ -1,5 +1,5 @@ """ -Support for Neato Connected Vaccums switches. +Support for Neato Connected Vacuums switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.neato/ @@ -68,7 +68,7 @@ class NeatoConnectedSwitch(ToggleEntity): self._schedule_state = STATE_ON else: self._schedule_state = STATE_OFF - _LOGGER.debug("Shedule state: %s", self._schedule_state) + _LOGGER.debug("Schedule state: %s", self._schedule_state) @property def name(self): diff --git a/homeassistant/components/switch/pilight.py b/homeassistant/components/switch/pilight.py index 201aee0f58c..1ce599366a1 100644 --- a/homeassistant/components/switch/pilight.py +++ b/homeassistant/components/switch/pilight.py @@ -19,9 +19,9 @@ from homeassistant.helpers.restore_state import async_get_last_state _LOGGER = logging.getLogger(__name__) CONF_OFF_CODE = 'off_code' -CONF_OFF_CODE_RECIEVE = 'off_code_receive' +CONF_OFF_CODE_RECEIVE = 'off_code_receive' CONF_ON_CODE = 'on_code' -CONF_ON_CODE_RECIEVE = 'on_code_receive' +CONF_ON_CODE_RECEIVE = 'on_code_receive' CONF_SYSTEMCODE = 'systemcode' CONF_UNIT = 'unit' CONF_UNITCODE = 'unitcode' @@ -48,9 +48,9 @@ SWITCHES_SCHEMA = vol.Schema({ vol.Required(CONF_ON_CODE): COMMAND_SCHEMA, vol.Required(CONF_OFF_CODE): COMMAND_SCHEMA, vol.Optional(CONF_NAME): cv.string, - vol.Optional(CONF_OFF_CODE_RECIEVE, default=[]): vol.All(cv.ensure_list, + vol.Optional(CONF_OFF_CODE_RECEIVE, default=[]): vol.All(cv.ensure_list, [COMMAND_SCHEMA]), - vol.Optional(CONF_ON_CODE_RECIEVE, default=[]): vol.All(cv.ensure_list, + vol.Optional(CONF_ON_CODE_RECEIVE, default=[]): vol.All(cv.ensure_list, [COMMAND_SCHEMA]) }) @@ -72,8 +72,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None): properties.get(CONF_NAME, dev_name), properties.get(CONF_ON_CODE), properties.get(CONF_OFF_CODE), - properties.get(CONF_ON_CODE_RECIEVE), - properties.get(CONF_OFF_CODE_RECIEVE) + properties.get(CONF_ON_CODE_RECEIVE), + properties.get(CONF_OFF_CODE_RECEIVE) ) ) diff --git a/homeassistant/components/switch/rachio.py b/homeassistant/components/switch/rachio.py index a1ce83b597a..d8d424be361 100644 --- a/homeassistant/components/switch/rachio.py +++ b/homeassistant/components/switch/rachio.py @@ -134,7 +134,7 @@ class RachioIro(object): return self._running def list_zones(self, include_disabled=False): - """Return alist of the zones connected to the device, incl. data.""" + """Return a list of the zones connected to the device, incl. data.""" if not self._zones: self._zones = [RachioZone(self.rachio, self, zone['id'], self.manual_run_mins) diff --git a/homeassistant/components/switch/rainbird.py b/homeassistant/components/switch/rainbird.py index ee283b3c269..9aa24b9360b 100644 --- a/homeassistant/components/switch/rainbird.py +++ b/homeassistant/components/switch/rainbird.py @@ -52,7 +52,7 @@ class RainBirdSwitch(SwitchDevice): self._devid = dev_id self._zone = int(dev.get(CONF_ZONE)) self._name = dev.get(CONF_FRIENDLY_NAME, - "Sprinker {}".format(self._zone)) + "Sprinkler {}".format(self._zone)) self._state = None self._duration = dev.get(CONF_TRIGGER_TIME) self._attributes = { diff --git a/homeassistant/components/tahoma.py b/homeassistant/components/tahoma.py index 4eacee08ec1..4488b4e836b 100644 --- a/homeassistant/components/tahoma.py +++ b/homeassistant/components/tahoma.py @@ -65,7 +65,7 @@ def setup(hass, config): api.get_setup() devices = api.get_devices() except RequestException: - _LOGGER.exception("Cannot fetch informations from Tahoma API") + _LOGGER.exception("Cannot fetch information from Tahoma API") return False hass.data[DOMAIN] = { diff --git a/homeassistant/components/telegram_bot/__init__.py b/homeassistant/components/telegram_bot/__init__.py index cb314c4a2b4..170e1517a6d 100644 --- a/homeassistant/components/telegram_bot/__init__.py +++ b/homeassistant/components/telegram_bot/__init__.py @@ -330,7 +330,7 @@ class TelegramNotificationService: This can be one of (message_id, inline_message_id) from a msg dict, returning a tuple. **You can use 'last' as message_id** to edit - the last sended message in the chat_id. + the message last sent in the chat_id. """ message_id = inline_message_id = None if ATTR_MESSAGEID in msg_data: @@ -354,7 +354,7 @@ class TelegramNotificationService: chat_ids = [t for t in target if t in self.allowed_chat_ids] if chat_ids: return chat_ids - _LOGGER.warning("Unallowed targets: %s, using default: %s", + _LOGGER.warning("Disallowed targets: %s, using default: %s", target, self._default_user) return [self._default_user] diff --git a/homeassistant/components/usps.py b/homeassistant/components/usps.py index 0c4eba54e35..58f858b0975 100644 --- a/homeassistant/components/usps.py +++ b/homeassistant/components/usps.py @@ -69,7 +69,7 @@ class USPSData(object): """ def __init__(self, session, name): - """Initialize the data oject.""" + """Initialize the data object.""" self.session = session self.name = name self.packages = [] diff --git a/homeassistant/components/vacuum/neato.py b/homeassistant/components/vacuum/neato.py index 29099db5cd5..2a4eb2d5e7f 100644 --- a/homeassistant/components/vacuum/neato.py +++ b/homeassistant/components/vacuum/neato.py @@ -1,5 +1,5 @@ """ -Support for Neato Connected Vaccums. +Support for Neato Connected Vacuums. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/vacuum.neato/ diff --git a/homeassistant/components/volvooncall.py b/homeassistant/components/volvooncall.py index dcd4ed518d0..3e36d0a3028 100644 --- a/homeassistant/components/volvooncall.py +++ b/homeassistant/components/volvooncall.py @@ -93,7 +93,7 @@ def setup(hass, config): hass, component, DOMAIN, (vehicle.vin, attr), config) def update_vehicle(vehicle): - """Revieve updated information on vehicle.""" + """Receive updated information on vehicle.""" state.vehicles[vehicle.vin] = vehicle if vehicle.vin not in state.entities: discover_vehicle(vehicle) diff --git a/homeassistant/components/weather/darksky.py b/homeassistant/components/weather/darksky.py index 0566cc03662..21f67ce080a 100644 --- a/homeassistant/components/weather/darksky.py +++ b/homeassistant/components/weather/darksky.py @@ -1,5 +1,5 @@ """ -Patform for retrieving meteorological data from Dark Sky. +Platform for retrieving meteorological data from Dark Sky. For more details about this platform, please refer to the documentation https://home-assistant.io/components/weather.darksky/ diff --git a/homeassistant/components/weather/openweathermap.py b/homeassistant/components/weather/openweathermap.py index 1ff5eeaa535..479831d713e 100644 --- a/homeassistant/components/weather/openweathermap.py +++ b/homeassistant/components/weather/openweathermap.py @@ -180,7 +180,7 @@ class WeatherData(object): @Throttle(MIN_TIME_BETWEEN_FORECAST_UPDATES) def update_forecast(self): - """Get the lastest forecast from OpenWeatherMap.""" + """Get the latest forecast from OpenWeatherMap.""" from pyowm.exceptions.api_call_error import APICallError try: diff --git a/homeassistant/components/zwave/const.py b/homeassistant/components/zwave/const.py index 2815be45df2..e2524aefadf 100644 --- a/homeassistant/components/zwave/const.py +++ b/homeassistant/components/zwave/const.py @@ -182,8 +182,8 @@ SPECIFIC_TYPE_NOT_USED = 0 # Available in all Generic types GENERIC_TYPE_AV_CONTROL_POINT = 3 SPECIFIC_TYPE_DOORBELL = 18 -SPECIFIC_TYPE_SATELLITE_RECIEVER = 4 -SPECIFIC_TYPE_SATELLITE_RECIEVER_V2 = 17 +SPECIFIC_TYPE_SATELLITE_RECEIVER = 4 +SPECIFIC_TYPE_SATELLITE_RECEIVER_V2 = 17 GENERIC_TYPE_DISPLAY = 4 SPECIFIC_TYPE_SIMPLE_DISPLAY = 1 diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 5b5c674c32b..f9570ac5858 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -77,7 +77,7 @@ class Entity(object): # Protect for multiple updates _update_staged = False - # Process updates pararell + # Process updates in parallel parallel_updates = None @property diff --git a/homeassistant/helpers/event.py b/homeassistant/helpers/event.py index e74881e6e89..f11b2eacf3a 100644 --- a/homeassistant/helpers/event.py +++ b/homeassistant/helpers/event.py @@ -231,7 +231,7 @@ def async_track_time_interval(hass, action, interval): @callback def interval_listener(now): - """Handle elaspsed intervals.""" + """Handle elapsed intervals.""" nonlocal remove remove = async_track_point_in_utc_time( hass, interval_listener, next_interval()) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index b8b6b29df81..1ef9aa15674 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -220,7 +220,7 @@ class Script(): def async_script_timeout(now): """Call after timeout is retrieve stop script.""" self._async_listener.remove(unsub) - self._log("Timout reach, abort script.") + self._log("Timeout reached, abort script.") self.async_stop() unsub = async_track_point_in_utc_time( diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 7eb0a602139..b381e1c2b0e 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -438,7 +438,7 @@ def multiply(value, amount): def logarithm(value, base=math.e): - """Filter to get logarithm of the value with a spesific base.""" + """Filter to get logarithm of the value with a specific base.""" try: return math.log(float(value), float(base)) except (ValueError, TypeError): diff --git a/homeassistant/scripts/influxdb_migrator.py b/homeassistant/scripts/influxdb_migrator.py index cad8f878ca6..f41240bad74 100644 --- a/homeassistant/scripts/influxdb_migrator.py +++ b/homeassistant/scripts/influxdb_migrator.py @@ -119,7 +119,7 @@ def run(script_args: List) -> int: point_wt_time = 0 print("Migrating from {} to {}".format(old_dbname, args.dbname)) - # Walk into measurenebt + # Walk into measurement for index, measurement in enumerate(measurements): # Get tag list diff --git a/tests/components/automation/test_numeric_state.py b/tests/components/automation/test_numeric_state.py index 58cfd2cbd70..63ca4b5cd1a 100644 --- a/tests/components/automation/test_numeric_state.py +++ b/tests/components/automation/test_numeric_state.py @@ -736,7 +736,7 @@ class TestAutomationNumericState(unittest.TestCase): self.hass.block_till_done() self.assertEqual(0, len(self.calls)) - def test_if_not_fires_on_entities_change_with_for_afte_stop(self): + def test_if_not_fires_on_entities_change_with_for_after_stop(self): """Test for not firing on entities change with for after stop.""" assert setup_component(self.hass, automation.DOMAIN, { automation.DOMAIN: { diff --git a/tests/components/automation/test_state.py b/tests/components/automation/test_state.py index bf54d24492a..22c84b88935 100644 --- a/tests/components/automation/test_state.py +++ b/tests/components/automation/test_state.py @@ -198,7 +198,7 @@ class TestAutomationState(unittest.TestCase): automation.DOMAIN: { 'trigger': { 'platform': 'state', - 'entity_id': 'test.anoter_entity', + 'entity_id': 'test.another_entity', }, 'action': { 'service': 'test.automation' @@ -468,7 +468,7 @@ class TestAutomationState(unittest.TestCase): self.assertEqual(1, len(self.calls)) def test_if_fires_on_for_condition(self): - """Test for firing if contition is on.""" + """Test for firing if condition is on.""" point1 = dt_util.utcnow() point2 = point1 + timedelta(seconds=10) with patch('homeassistant.core.dt_util.utcnow') as mock_utcnow: @@ -504,7 +504,7 @@ class TestAutomationState(unittest.TestCase): self.assertEqual(1, len(self.calls)) def test_if_fires_on_for_condition_attribute_change(self): - """Test for firing if contition is on with attribute change.""" + """Test for firing if condition is on with attribute change.""" point1 = dt_util.utcnow() point2 = point1 + timedelta(seconds=4) point3 = point1 + timedelta(seconds=8) diff --git a/tests/components/automation/test_sun.py b/tests/components/automation/test_sun.py index ac1d7bc5acf..355d088719f 100644 --- a/tests/components/automation/test_sun.py +++ b/tests/components/automation/test_sun.py @@ -127,7 +127,7 @@ class TestAutomationSun(unittest.TestCase): self.assertEqual('sun - sunset - 0:30:00', self.calls[0].data['some']) def test_sunrise_trigger_with_offset(self): - """Test the runrise trigger with offset.""" + """Test the sunrise trigger with offset.""" now = datetime(2015, 9, 13, 23, tzinfo=dt_util.UTC) trigger_time = datetime(2015, 9, 16, 13, 30, tzinfo=dt_util.UTC) diff --git a/tests/components/binary_sensor/test_vultr.py b/tests/components/binary_sensor/test_vultr.py index 91d5da34901..a13944aef9f 100644 --- a/tests/components/binary_sensor/test_vultr.py +++ b/tests/components/binary_sensor/test_vultr.py @@ -78,7 +78,7 @@ class TestVultrBinarySensorSetup(unittest.TestCase): for device in self.DEVICES: - # Test pre data retieval + # Test pre data retrieval if device.subscription == '555555': self.assertEqual('Vultr {}', device.name) diff --git a/tests/components/cover/test_template.py b/tests/components/cover/test_template.py index af114135da9..3d7aa3ce618 100644 --- a/tests/components/cover/test_template.py +++ b/tests/components/cover/test_template.py @@ -275,7 +275,7 @@ class TestTemplateCover(unittest.TestCase): assert self.hass.states.all() == [] def test_template_open_and_close(self): - """Test that if open_cover is specified, cose_cover is too.""" + """Test that if open_cover is specified, close_cover is too.""" with assert_setup_component(0, 'cover'): assert setup.setup_component(self.hass, 'cover', { 'cover': { diff --git a/tests/components/device_tracker/test_asuswrt.py b/tests/components/device_tracker/test_asuswrt.py index 6e646e9862d..f8d3fdf128b 100644 --- a/tests/components/device_tracker/test_asuswrt.py +++ b/tests/components/device_tracker/test_asuswrt.py @@ -378,7 +378,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase): telnet.login.assert_not_called() def test_get_asuswrt_data(self): - """Test aususwrt data fetch.""" + """Test asuswrt data fetch.""" scanner = get_scanner(self.hass, VALID_CONFIG_ROUTER_SSH) scanner._get_wl = mock.Mock() scanner._get_arp = mock.Mock() diff --git a/tests/components/device_tracker/test_init.py b/tests/components/device_tracker/test_init.py index 78813d9ff0b..84cca1bb843 100644 --- a/tests/components/device_tracker/test_init.py +++ b/tests/components/device_tracker/test_init.py @@ -704,7 +704,7 @@ class TestComponentsDeviceTracker(unittest.TestCase): @asyncio.coroutine def test_async_added_to_hass(hass): - """Test resoring state.""" + """Test restoring state.""" attr = { device_tracker.ATTR_LONGITUDE: 18, device_tracker.ATTR_LATITUDE: -33, diff --git a/tests/components/device_tracker/test_mqtt.py b/tests/components/device_tracker/test_mqtt.py index eb461062971..4905ab4d029 100644 --- a/tests/components/device_tracker/test_mqtt.py +++ b/tests/components/device_tracker/test_mqtt.py @@ -56,7 +56,7 @@ class TestComponentsDeviceTrackerMQTT(unittest.TestCase): def test_new_message(self): """Test new message.""" dev_id = 'paulus' - enttiy_id = device_tracker.ENTITY_ID_FORMAT.format(dev_id) + entity_id = device_tracker.ENTITY_ID_FORMAT.format(dev_id) topic = '/location/paulus' location = 'work' @@ -69,4 +69,4 @@ class TestComponentsDeviceTrackerMQTT(unittest.TestCase): }) fire_mqtt_message(self.hass, topic, location) self.hass.block_till_done() - self.assertEqual(location, self.hass.states.get(enttiy_id).state) + self.assertEqual(location, self.hass.states.get(entity_id).state) diff --git a/tests/components/device_tracker/test_owntracks.py b/tests/components/device_tracker/test_owntracks.py index 44c0e0c6295..2239e13e220 100644 --- a/tests/components/device_tracker/test_owntracks.py +++ b/tests/components/device_tracker/test_owntracks.py @@ -433,7 +433,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): def test_event_gps_entry_exit(self): """Test the entry event.""" - # Entering the owntrack circular region named "inner" + # Entering the owntracks circular region named "inner" self.send_message(EVENT_TOPIC, REGION_GPS_ENTER_MESSAGE) # Enter uses the zone's gps co-ords @@ -447,7 +447,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): # note that LOCATION_MESSAGE is actually pretty far # from INNER_ZONE and has good accuracy. I haven't # received a transition message though so I'm still - # asssociated with the inner zone regardless of GPS. + # associated with the inner zone regardless of GPS. self.assert_location_latitude(INNER_ZONE['latitude']) self.assert_location_accuracy(INNER_ZONE['radius']) self.assert_location_state('inner') @@ -624,7 +624,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): def test_event_entry_zone_loading_dash(self): """Test the event for zone landing.""" # Make sure the leading - is ignored - # Ownracks uses this to switch on hold + # Owntracks uses this to switch on hold message = build_message( {'desc': "-inner"}, REGION_GPS_ENTER_MESSAGE) @@ -673,10 +673,10 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): def test_event_source_type_entry_exit(self): """Test the entry and exit events of source type.""" - # Entering the owntrack circular region named "inner" + # Entering the owntracks circular region named "inner" self.send_message(EVENT_TOPIC, REGION_GPS_ENTER_MESSAGE) - # source_type should be gps when enterings using gps. + # source_type should be gps when entering using gps. self.assert_location_source_type('gps') # owntracks shouldn't send beacon events with acc = 0 @@ -715,7 +715,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): # note that LOCATION_MESSAGE is actually pretty far # from INNER_ZONE and has good accuracy. I haven't # received a transition message though so I'm still - # asssociated with the inner zone regardless of GPS. + # associated with the inner zone regardless of GPS. self.assert_location_latitude(INNER_ZONE['latitude']) self.assert_location_accuracy(INNER_ZONE['radius']) self.assert_location_state('inner') @@ -865,7 +865,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT): def test_event_beacon_entry_zone_loading_dash(self): """Test the event for beacon zone landing.""" # Make sure the leading - is ignored - # Ownracks uses this to switch on hold + # Owntracks uses this to switch on hold message = build_message( {'desc': "-inner"}, diff --git a/tests/components/emulated_hue/test_hue_api.py b/tests/components/emulated_hue/test_hue_api.py index af07da547b7..cba3c835763 100644 --- a/tests/components/emulated_hue/test_hue_api.py +++ b/tests/components/emulated_hue/test_hue_api.py @@ -218,7 +218,7 @@ def test_get_light_state(hass_hue, hue_client): @asyncio.coroutine def test_put_light_state(hass_hue, hue_client): - """Test the seeting of light states.""" + """Test the setting of light states.""" yield from perform_put_test_on_ceiling_lights(hass_hue, hue_client) # Turn the bedroom light on first @@ -452,7 +452,7 @@ def perform_put_test_on_ceiling_lights(hass_hue, hue_client, @asyncio.coroutine def perform_get_light_state(client, entity_id, expected_status): - """Test the gettting of a light state.""" + """Test the getting of a light state.""" result = yield from client.get('/api/username/lights/{}'.format(entity_id)) assert result.status == expected_status diff --git a/tests/components/image_processing/__init__.py b/tests/components/image_processing/__init__.py index 6e79d49c251..63aee1dfbaf 100644 --- a/tests/components/image_processing/__init__.py +++ b/tests/components/image_processing/__init__.py @@ -1 +1 @@ -"""Test 'image_processing' component plaforms.""" +"""Test 'image_processing' component platforms.""" diff --git a/tests/components/image_processing/test_init.py b/tests/components/image_processing/test_init.py index b0bb7d77e3c..628c5405eaa 100644 --- a/tests/components/image_processing/test_init.py +++ b/tests/components/image_processing/test_init.py @@ -275,7 +275,7 @@ class TestImageProcessingFace(object): @patch('homeassistant.components.image_processing.demo.' 'DemoImageProcessingFace.confidence', new_callable=PropertyMock(return_value=None)) - def test_face_event_call_no_confidence(self, mock_confi, aioclient_mock): + def test_face_event_call_no_confidence(self, mock_config, aioclient_mock): """Setup and scan a picture and test faces from event.""" aioclient_mock.get(self.url, content=b'image') diff --git a/tests/components/image_processing/test_openalpr_cloud.py b/tests/components/image_processing/test_openalpr_cloud.py index e35ac8185d0..40945f932c6 100644 --- a/tests/components/image_processing/test_openalpr_cloud.py +++ b/tests/components/image_processing/test_openalpr_cloud.py @@ -1,4 +1,4 @@ -"""The tests for the openalpr clooud platform.""" +"""The tests for the openalpr cloud platform.""" import asyncio from unittest.mock import patch, PropertyMock @@ -13,7 +13,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, load_fixture) -class TestOpenAlprCloudlSetup(object): +class TestOpenAlprCloudSetup(object): """Test class for image processing.""" def setup_method(self): diff --git a/tests/components/light/test_rflink.py b/tests/components/light/test_rflink.py index 25f83b1d123..a6e6d3c1a85 100644 --- a/tests/components/light/test_rflink.py +++ b/tests/components/light/test_rflink.py @@ -254,7 +254,7 @@ def test_signal_repetitions(hass, monkeypatch): assert protocol.send_command_ack.call_count == 2 - # test if default apply to configured devcies + # test if default apply to configured devices hass.async_add_job( hass.services.async_call(DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DOMAIN + '.test1'})) diff --git a/tests/components/light/test_rfxtrx.py b/tests/components/light/test_rfxtrx.py index eef54a6c258..a1f63e45748 100644 --- a/tests/components/light/test_rfxtrx.py +++ b/tests/components/light/test_rfxtrx.py @@ -248,7 +248,7 @@ class TestLightRfxtrx(unittest.TestCase): rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event) self.assertEqual(2, len(rfxtrx_core.RFX_DEVICES)) - # trying to add a swicth + # trying to add a switch event = rfxtrx_core.get_rfx_object('0b1100100118cdea02010f70') event.data = bytearray([0x0b, 0x11, 0x00, 0x10, 0x01, 0x18, 0xcd, 0xea, 0x01, 0x01, 0x0f, 0x70]) diff --git a/tests/components/light/test_zwave.py b/tests/components/light/test_zwave.py index a260d160bb5..b925b74a7f0 100644 --- a/tests/components/light/test_zwave.py +++ b/tests/components/light/test_zwave.py @@ -208,7 +208,7 @@ def test_set_rgb_color(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB only + # Supports RGB only color_channels = MockValue(data=0x1c, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -226,7 +226,7 @@ def test_set_rgbw_color(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGBW + # Supports RGBW color_channels = MockValue(data=0x1d, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -245,7 +245,7 @@ def test_zw098_set_color_temp(mock_openzwave): command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB, warm white, cold white + # Supports RGB, warm white, cold white color_channels = MockValue(data=0x1f, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -267,7 +267,7 @@ def test_rgb_not_supported(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts color temperature only + # Supports color temperature only color_channels = MockValue(data=0x01, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -302,7 +302,7 @@ def test_rgb_value_changed(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB only + # Supports RGB only color_channels = MockValue(data=0x1c, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -321,7 +321,7 @@ def test_rgbww_value_changed(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB, Warm White + # Supports RGB, Warm White color_channels = MockValue(data=0x1d, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -340,7 +340,7 @@ def test_rgbcw_value_changed(mock_openzwave): node = MockNode(command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB, Cold White + # Supports RGB, Cold White color_channels = MockValue(data=0x1e, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) @@ -360,7 +360,7 @@ def test_ct_value_changed(mock_openzwave): command_classes=[const.COMMAND_CLASS_SWITCH_COLOR]) value = MockValue(data=0, node=node) color = MockValue(data='#0000000000', node=node) - # Suppoorts RGB, Cold White + # Supports RGB, Cold White color_channels = MockValue(data=0x1f, node=node) values = MockLightValues(primary=value, color=color, color_channels=color_channels) diff --git a/tests/components/media_player/test_soundtouch.py b/tests/components/media_player/test_soundtouch.py index a8242b39f7f..2da2622e08a 100644 --- a/tests/components/media_player/test_soundtouch.py +++ b/tests/components/media_player/test_soundtouch.py @@ -158,7 +158,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): self.hass.stop() @mock.patch('libsoundtouch.soundtouch_device', side_effect=None) - def test_ensure_setup_config(self, mocked_sountouch_device): + def test_ensure_setup_config(self, mocked_soundtouch_device): """Test setup OK with custom config.""" soundtouch.setup_platform(self.hass, default_component(), @@ -167,10 +167,10 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): self.assertEqual(len(all_devices), 1) self.assertEqual(all_devices[0].name, 'soundtouch') self.assertEqual(all_devices[0].config['port'], 8090) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) @mock.patch('libsoundtouch.soundtouch_device', side_effect=None) - def test_ensure_setup_discovery(self, mocked_sountouch_device): + def test_ensure_setup_discovery(self, mocked_soundtouch_device): """Test setup with discovery.""" new_device = {"port": "8090", "host": "192.168.1.1", @@ -184,11 +184,11 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): self.assertEqual(len(all_devices), 1) self.assertEqual(all_devices[0].config['port'], 8090) self.assertEqual(all_devices[0].config['host'], '192.168.1.1') - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) @mock.patch('libsoundtouch.soundtouch_device', side_effect=None) def test_ensure_setup_discovery_no_duplicate(self, - mocked_sountouch_device): + mocked_soundtouch_device): """Test setup OK if device already exists.""" soundtouch.setup_platform(self.hass, default_component(), @@ -213,20 +213,20 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock(), existing_device # Existing device ) - self.assertEqual(mocked_sountouch_device.call_count, 2) + self.assertEqual(mocked_soundtouch_device.call_count, 2) self.assertEqual(len(self.hass.data[soundtouch.DATA_SOUNDTOUCH]), 2) @mock.patch('libsoundtouch.device.SoundTouchDevice.volume') @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_update(self, mocked_sountouch_device, mocked_status, + def test_update(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test update device state.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) self.hass.data[soundtouch.DATA_SOUNDTOUCH][0].update() @@ -238,13 +238,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): side_effect=MockStatusPlaying) @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_playing_media(self, mocked_sountouch_device, mocked_status, + def test_playing_media(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test playing media info.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -261,13 +261,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): side_effect=MockStatusUnknown) @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_playing_unknown_media(self, mocked_sountouch_device, + def test_playing_unknown_media(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test playing media info.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -278,13 +278,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): side_effect=MockStatusPlayingRadio) @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_playing_radio(self, mocked_sountouch_device, mocked_status, + def test_playing_radio(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test playing radio info.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -301,13 +301,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_get_volume_level(self, mocked_sountouch_device, mocked_status, + def test_get_volume_level(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test volume level.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -318,13 +318,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): side_effect=MockStatusStandby) @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_get_state_off(self, mocked_sountouch_device, mocked_status, + def test_get_state_off(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test state device is off.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -335,13 +335,13 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): side_effect=MockStatusPause) @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_get_state_pause(self, mocked_sountouch_device, mocked_status, + def test_get_state_pause(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test state device is paused.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] @@ -352,25 +352,25 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_is_muted(self, mocked_sountouch_device, mocked_status, + def test_is_muted(self, mocked_soundtouch_device, mocked_status, mocked_volume): """Test device volume is muted.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] self.assertEqual(all_devices[0].is_volume_muted, True) @mock.patch('libsoundtouch.soundtouch_device') - def test_media_commands(self, mocked_sountouch_device): + def test_media_commands(self, mocked_soundtouch_device): """Test supported media commands.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] self.assertEqual(all_devices[0].supported_features, 17853) @@ -379,7 +379,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_should_turn_off(self, mocked_sountouch_device, mocked_status, + def test_should_turn_off(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_power_off): """Test device is turned off.""" soundtouch.setup_platform(self.hass, @@ -387,7 +387,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].turn_off() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 1) self.assertEqual(mocked_power_off.call_count, 1) @@ -397,7 +397,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_should_turn_on(self, mocked_sountouch_device, mocked_status, + def test_should_turn_on(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_power_on): """Test device is turned on.""" soundtouch.setup_platform(self.hass, @@ -405,7 +405,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].turn_on() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 1) self.assertEqual(mocked_power_on.call_count, 1) @@ -415,7 +415,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_volume_up(self, mocked_sountouch_device, mocked_status, + def test_volume_up(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_volume_up): """Test volume up.""" soundtouch.setup_platform(self.hass, @@ -423,7 +423,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].volume_up() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 2) self.assertEqual(mocked_volume_up.call_count, 1) @@ -433,7 +433,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_volume_down(self, mocked_sountouch_device, mocked_status, + def test_volume_down(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_volume_down): """Test volume down.""" soundtouch.setup_platform(self.hass, @@ -441,7 +441,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].volume_down() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 2) self.assertEqual(mocked_volume_down.call_count, 1) @@ -451,7 +451,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_set_volume_level(self, mocked_sountouch_device, mocked_status, + def test_set_volume_level(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_set_volume): """Test set volume level.""" soundtouch.setup_platform(self.hass, @@ -459,7 +459,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].set_volume_level(0.17) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 2) mocked_set_volume.assert_called_with(17) @@ -469,7 +469,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_mute(self, mocked_sountouch_device, mocked_status, mocked_volume, + def test_mute(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_mute): """Test mute volume.""" soundtouch.setup_platform(self.hass, @@ -477,7 +477,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].mute_volume(None) - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 2) self.assertEqual(mocked_mute.call_count, 1) @@ -487,7 +487,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_play(self, mocked_sountouch_device, mocked_status, mocked_volume, + def test_play(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_play): """Test play command.""" soundtouch.setup_platform(self.hass, @@ -495,7 +495,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].media_play() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 1) self.assertEqual(mocked_play.call_count, 1) @@ -505,15 +505,15 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_pause(self, mocked_sountouch_device, mocked_status, mocked_volume, - mocked_pause): + def test_pause(self, mocked_soundtouch_device, mocked_status, + mocked_volume, mocked_pause): """Test pause command.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].media_pause() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 1) self.assertEqual(mocked_pause.call_count, 1) @@ -523,7 +523,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_play_pause_play(self, mocked_sountouch_device, mocked_status, + def test_play_pause_play(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_play_pause): """Test play/pause.""" soundtouch.setup_platform(self.hass, @@ -531,7 +531,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].media_play_pause() - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 1) self.assertEqual(mocked_play_pause.call_count, 1) @@ -542,7 +542,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_next_previous_track(self, mocked_sountouch_device, mocked_status, + def test_next_previous_track(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_next_track, mocked_previous_track): """Test next/previous track.""" @@ -550,7 +550,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): default_component(), mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices[0].media_next_track() @@ -567,14 +567,14 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_play_media(self, mocked_sountouch_device, mocked_status, + def test_play_media(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_presets, mocked_select_preset): """Test play preset 1.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices[0].play_media('PLAYLIST', 1) @@ -589,14 +589,14 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_play_media_url(self, mocked_sountouch_device, mocked_status, + def test_play_media_url(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_play_url): """Test play preset 1.""" soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock()) all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] - self.assertEqual(mocked_sountouch_device.call_count, 1) + self.assertEqual(mocked_soundtouch_device.call_count, 1) self.assertEqual(mocked_status.call_count, 1) self.assertEqual(mocked_volume.call_count, 1) all_devices[0].play_media('MUSIC', "http://fqdn/file.mp3") @@ -607,7 +607,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_play_everywhere(self, mocked_sountouch_device, mocked_status, + def test_play_everywhere(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_create_zone): """Test play everywhere.""" soundtouch.setup_platform(self.hass, @@ -619,7 +619,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].entity_id = "media_player.entity_1" all_devices[1].entity_id = "media_player.entity_2" - self.assertEqual(mocked_sountouch_device.call_count, 2) + self.assertEqual(mocked_soundtouch_device.call_count, 2) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 2) @@ -647,7 +647,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_create_zone(self, mocked_sountouch_device, mocked_status, + def test_create_zone(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_create_zone): """Test creating a zone.""" soundtouch.setup_platform(self.hass, @@ -659,7 +659,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].entity_id = "media_player.entity_1" all_devices[1].entity_id = "media_player.entity_2" - self.assertEqual(mocked_sountouch_device.call_count, 2) + self.assertEqual(mocked_soundtouch_device.call_count, 2) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 2) @@ -689,7 +689,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_remove_zone_slave(self, mocked_sountouch_device, mocked_status, + def test_remove_zone_slave(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_remove_zone_slave): """Test adding a slave to an existing zone.""" soundtouch.setup_platform(self.hass, @@ -701,7 +701,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].entity_id = "media_player.entity_1" all_devices[1].entity_id = "media_player.entity_2" - self.assertEqual(mocked_sountouch_device.call_count, 2) + self.assertEqual(mocked_soundtouch_device.call_count, 2) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 2) @@ -731,7 +731,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): @mock.patch('libsoundtouch.device.SoundTouchDevice.status') @mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device) - def test_add_zone_slave(self, mocked_sountouch_device, mocked_status, + def test_add_zone_slave(self, mocked_soundtouch_device, mocked_status, mocked_volume, mocked_add_zone_slave): """Test removing a slave from a zone.""" soundtouch.setup_platform(self.hass, @@ -743,7 +743,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH] all_devices[0].entity_id = "media_player.entity_1" all_devices[1].entity_id = "media_player.entity_2" - self.assertEqual(mocked_sountouch_device.call_count, 2) + self.assertEqual(mocked_soundtouch_device.call_count, 2) self.assertEqual(mocked_status.call_count, 2) self.assertEqual(mocked_volume.call_count, 2) diff --git a/tests/components/notify/test_facebook.py b/tests/components/notify/test_facebook.py index 7bc7a55869a..b94a4c38a40 100644 --- a/tests/components/notify/test_facebook.py +++ b/tests/components/notify/test_facebook.py @@ -6,7 +6,7 @@ import homeassistant.components.notify.facebook as facebook class TestFacebook(unittest.TestCase): - """Tests for Facebook notifification service.""" + """Tests for Facebook notification service.""" def setUp(self): """Set up test variables.""" diff --git a/tests/components/sensor/test_mqtt.py b/tests/components/sensor/test_mqtt.py index efcd44658c3..b23d89e3057 100644 --- a/tests/components/sensor/test_mqtt.py +++ b/tests/components/sensor/test_mqtt.py @@ -110,7 +110,7 @@ class TestSensorMQTT(unittest.TestCase): self.assertEqual('unknown', state.state) def test_setting_sensor_value_via_mqtt_json_message(self): - """Test the setting of the value via MQTT with JSON playload.""" + """Test the setting of the value via MQTT with JSON payload.""" mock_component(self.hass, 'mqtt') assert setup_component(self.hass, sensor.DOMAIN, { sensor.DOMAIN: { @@ -244,7 +244,7 @@ class TestSensorMQTT(unittest.TestCase): self.hass.bus.fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: now}) def test_setting_sensor_attribute_via_mqtt_json_message(self): - """Test the setting of attribute via MQTT with JSON playload.""" + """Test the setting of attribute via MQTT with JSON payload.""" mock_component(self.hass, 'mqtt') assert setup_component(self.hass, sensor.DOMAIN, { sensor.DOMAIN: { diff --git a/tests/components/sensor/test_random.py b/tests/components/sensor/test_random.py index eeefef74c02..e04fc31af84 100644 --- a/tests/components/sensor/test_random.py +++ b/tests/components/sensor/test_random.py @@ -18,7 +18,7 @@ class TestRandomSensor(unittest.TestCase): self.hass.stop() def test_random_sensor(self): - """Test the Randowm number sensor.""" + """Test the Random number sensor.""" config = { 'sensor': { 'platform': 'random', diff --git a/tests/components/sensor/test_ring.py b/tests/components/sensor/test_ring.py index fb31dc7c53c..0cce0ea681d 100644 --- a/tests/components/sensor/test_ring.py +++ b/tests/components/sensor/test_ring.py @@ -50,7 +50,7 @@ class TestRingSensorSetup(unittest.TestCase): @requests_mock.Mocker() def test_sensor(self, mock): - """Test the Ring senskor class and methods.""" + """Test the Ring sensor class and methods.""" mock.post('https://api.ring.com/clients_api/session', text=load_fixture('ring_session.json')) mock.get('https://api.ring.com/clients_api/ring_devices', diff --git a/tests/components/sensor/test_season.py b/tests/components/sensor/test_season.py index 9dda0d2f2cb..5c071982f7f 100644 --- a/tests/components/sensor/test_season.py +++ b/tests/components/sensor/test_season.py @@ -73,7 +73,7 @@ class TestSeason(unittest.TestCase): """Stop everything that was started.""" self.hass.stop() - def test_season_should_be_summer_northern_astonomical(self): + def test_season_should_be_summer_northern_astronomical(self): """Test that season should be summer.""" # A known day in summer summer_day = datetime(2017, 9, 3, 0, 0) @@ -91,7 +91,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_SUMMER, current_season) - def test_season_should_be_autumn_northern_astonomical(self): + def test_season_should_be_autumn_northern_astronomical(self): """Test that season should be autumn.""" # A known day in autumn autumn_day = datetime(2017, 9, 23, 0, 0) @@ -109,7 +109,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_AUTUMN, current_season) - def test_season_should_be_winter_northern_astonomical(self): + def test_season_should_be_winter_northern_astronomical(self): """Test that season should be winter.""" # A known day in winter winter_day = datetime(2017, 12, 25, 0, 0) @@ -127,7 +127,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_WINTER, current_season) - def test_season_should_be_spring_northern_astonomical(self): + def test_season_should_be_spring_northern_astronomical(self): """Test that season should be spring.""" # A known day in spring spring_day = datetime(2017, 4, 1, 0, 0) @@ -145,7 +145,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_SPRING, current_season) - def test_season_should_be_winter_southern_astonomical(self): + def test_season_should_be_winter_southern_astronomical(self): """Test that season should be winter.""" # A known day in winter winter_day = datetime(2017, 9, 3, 0, 0) @@ -163,7 +163,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_WINTER, current_season) - def test_season_should_be_spring_southern_astonomical(self): + def test_season_should_be_spring_southern_astronomical(self): """Test that season should be spring.""" # A known day in spring spring_day = datetime(2017, 9, 23, 0, 0) @@ -181,7 +181,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_SPRING, current_season) - def test_season_should_be_summer_southern_astonomical(self): + def test_season_should_be_summer_southern_astronomical(self): """Test that season should be summer.""" # A known day in summer summer_day = datetime(2017, 12, 25, 0, 0) @@ -199,7 +199,7 @@ class TestSeason(unittest.TestCase): self.assertEqual(season.STATE_SUMMER, current_season) - def test_season_should_be_autumn_southern_astonomical(self): + def test_season_should_be_autumn_southern_astronomical(self): """Test that season should be spring.""" # A known day in spring autumn_day = datetime(2017, 4, 1, 0, 0) diff --git a/tests/components/test_alert.py b/tests/components/test_alert.py index a94e5747483..d9eb33be37d 100644 --- a/tests/components/test_alert.py +++ b/tests/components/test_alert.py @@ -107,7 +107,7 @@ class TestAlert(unittest.TestCase): self.assertEqual(STATE_ON, self.hass.states.get(ENTITY_ID).state) def test_hidden(self): - """Test entity hidding.""" + """Test entity hiding.""" assert setup_component(self.hass, alert.DOMAIN, TEST_CONFIG) hidden = self.hass.states.get(ENTITY_ID).attributes.get('hidden') self.assertTrue(hidden) diff --git a/tests/components/test_ffmpeg.py b/tests/components/test_ffmpeg.py index 9cc706b5690..5a5fdffd5a3 100644 --- a/tests/components/test_ffmpeg.py +++ b/tests/components/test_ffmpeg.py @@ -97,7 +97,7 @@ def test_setup_component_test_register_no_startup(hass): @asyncio.coroutine -def test_setup_component_test_servcie_start(hass): +def test_setup_component_test_service_start(hass): """Setup ffmpeg component test service start.""" with assert_setup_component(2): yield from async_setup_component( @@ -113,7 +113,7 @@ def test_setup_component_test_servcie_start(hass): @asyncio.coroutine -def test_setup_component_test_servcie_stop(hass): +def test_setup_component_test_service_stop(hass): """Setup ffmpeg component test service stop.""" with assert_setup_component(2): yield from async_setup_component( @@ -129,7 +129,7 @@ def test_setup_component_test_servcie_stop(hass): @asyncio.coroutine -def test_setup_component_test_servcie_restart(hass): +def test_setup_component_test_service_restart(hass): """Setup ffmpeg component test service restart.""" with assert_setup_component(2): yield from async_setup_component( @@ -146,7 +146,7 @@ def test_setup_component_test_servcie_restart(hass): @asyncio.coroutine -def test_setup_component_test_servcie_start_with_entity(hass): +def test_setup_component_test_service_start_with_entity(hass): """Setup ffmpeg component test service start.""" with assert_setup_component(2): yield from async_setup_component( diff --git a/tests/components/test_hassio.py b/tests/components/test_hassio.py index fb869569670..8fb017309de 100644 --- a/tests/components/test_hassio.py +++ b/tests/components/test_hassio.py @@ -211,7 +211,7 @@ def test_setup_hassio_no_additional_data(hass, aioclient_mock): @asyncio.coroutine def test_service_register(hassio_env, hass): - """Check if service will be settup.""" + """Check if service will be setup.""" assert (yield from async_setup_component(hass, 'hassio', {})) assert hass.services.has_service('hassio', 'addon_start') assert hass.services.has_service('hassio', 'addon_stop') diff --git a/tests/components/test_init.py b/tests/components/test_init.py index 06ba8a57508..dde141b6495 100644 --- a/tests/components/test_init.py +++ b/tests/components/test_init.py @@ -1,4 +1,4 @@ -"""The testd for Core components.""" +"""The tests for Core components.""" # pylint: disable=protected-access import asyncio import unittest diff --git a/tests/components/test_pilight.py b/tests/components/test_pilight.py index 7bdd44136e8..010136ee0e7 100644 --- a/tests/components/test_pilight.py +++ b/tests/components/test_pilight.py @@ -304,7 +304,7 @@ class TestPilight(unittest.TestCase): with assert_setup_component(4): whitelist = { 'protocol': [PilightDaemonSim.test_message['protocol'], - 'other_protocoll'], + 'other_protocol'], 'id': [PilightDaemonSim.test_message['message']['id']]} self.assertTrue(setup_component( self.hass, pilight.DOMAIN, @@ -330,7 +330,7 @@ class TestPilight(unittest.TestCase): """Check whitelist filter with unmatched data, should not work.""" with assert_setup_component(4): whitelist = { - 'protocol': ['wrong_protocoll'], + 'protocol': ['wrong_protocol'], 'id': [PilightDaemonSim.test_message['message']['id']]} self.assertTrue(setup_component( self.hass, pilight.DOMAIN, diff --git a/tests/components/test_plant.py b/tests/components/test_plant.py index 14db6689386..ee1372509d9 100644 --- a/tests/components/test_plant.py +++ b/tests/components/test_plant.py @@ -105,7 +105,7 @@ class TestPlant(unittest.TestCase): self.assertEqual(5, state.attributes[plant.READING_MOISTURE]) @pytest.mark.skipif(plant.ENABLE_LOAD_HISTORY is False, - reason="tests for loading from DB are instable, thus" + reason="tests for loading from DB are unstable, thus" "this feature is turned of until tests become" "stable") def test_load_from_db(self): diff --git a/tests/components/test_remember_the_milk.py b/tests/components/test_remember_the_milk.py index 1b6619aca9c..d9db61efd40 100644 --- a/tests/components/test_remember_the_milk.py +++ b/tests/components/test_remember_the_milk.py @@ -54,7 +54,7 @@ class TestConfiguration(unittest.TestCase): def test_invalid_data(self): """Test starts with invalid data and should not raise an exception.""" with patch("builtins.open", - mock_open(read_data='random charachters')),\ + mock_open(read_data='random characters')),\ patch("os.path.isfile", Mock(return_value=True)): config = rtm.RememberTheMilkConfiguration(self.hass) self.assertIsNotNone(config) diff --git a/tests/components/test_rflink.py b/tests/components/test_rflink.py index e7907fc6b54..9f6573920ca 100644 --- a/tests/components/test_rflink.py +++ b/tests/components/test_rflink.py @@ -47,7 +47,7 @@ def mock_rflink(hass, config, domain, monkeypatch, failures=None, 'rflink.protocol.create_rflink_connection', mock_create) - # verify instanstiation of component with given config + # verify instantiation of component with given config with assert_setup_component(platform_count, domain): yield from async_setup_component(hass, domain, config) diff --git a/tests/components/test_rss_feed_template.py b/tests/components/test_rss_feed_template.py index 60eb2530ea1..8b16b5519e9 100644 --- a/tests/components/test_rss_feed_template.py +++ b/tests/components/test_rss_feed_template.py @@ -25,7 +25,7 @@ def mock_http_client(loop, hass, test_client): @asyncio.coroutine -def test_get_noexistant_feed(mock_http_client): +def test_get_nonexistant_feed(mock_http_client): """Test if we can retrieve the correct rss feed.""" resp = yield from mock_http_client.get('/api/rss_template/otherfeed') assert resp.status == 404 diff --git a/tests/components/zwave/test_init.py b/tests/components/zwave/test_init.py index e548efb0eb2..77de7d5d1dd 100644 --- a/tests/components/zwave/test_init.py +++ b/tests/components/zwave/test_init.py @@ -899,7 +899,7 @@ class TestZWaveServices(unittest.TestCase): assert value.label == "New Label" def test_set_poll_intensity_enable(self): - """Test zwave set_poll_intensity service, succsessful set.""" + """Test zwave set_poll_intensity service, successful set.""" node = MockNode(node_id=14) value = MockValue(index=12, value_id=123456, poll_intensity=0) node.values = {123456: value} diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index e413fc145ca..4211e3da31b 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -232,8 +232,8 @@ def test_async_schedule_update_ha_state(hass): @asyncio.coroutine -def test_async_pararell_updates_with_zero(hass): - """Test pararell updates with 0 (disabled).""" +def test_async_parallel_updates_with_zero(hass): + """Test parallel updates with 0 (disabled).""" updates = [] test_lock = asyncio.Event(loop=hass.loop) @@ -269,11 +269,11 @@ def test_async_pararell_updates_with_zero(hass): @asyncio.coroutine -def test_async_pararell_updates_with_one(hass): - """Test pararell updates with 1 (sequential).""" +def test_async_parallel_updates_with_one(hass): + """Test parallel updates with 1 (sequential).""" updates = [] test_lock = asyncio.Lock(loop=hass.loop) - test_semephore = asyncio.Semaphore(1, loop=hass.loop) + test_semaphore = asyncio.Semaphore(1, loop=hass.loop) yield from test_lock.acquire() @@ -284,7 +284,7 @@ def test_async_pararell_updates_with_one(hass): self.entity_id = entity_id self.hass = hass self._count = count - self.parallel_updates = test_semephore + self.parallel_updates = test_semaphore @asyncio.coroutine def async_update(self): @@ -332,11 +332,11 @@ def test_async_pararell_updates_with_one(hass): @asyncio.coroutine -def test_async_pararell_updates_with_two(hass): - """Test pararell updates with 2 (pararell).""" +def test_async_parallel_updates_with_two(hass): + """Test parallel updates with 2 (parallel).""" updates = [] test_lock = asyncio.Lock(loop=hass.loop) - test_semephore = asyncio.Semaphore(2, loop=hass.loop) + test_semaphore = asyncio.Semaphore(2, loop=hass.loop) yield from test_lock.acquire() @@ -347,7 +347,7 @@ def test_async_pararell_updates_with_two(hass): self.entity_id = entity_id self.hass = hass self._count = count - self.parallel_updates = test_semephore + self.parallel_updates = test_semaphore @asyncio.coroutine def async_update(self): diff --git a/tests/helpers/test_entity_component.py b/tests/helpers/test_entity_component.py index 40a0f8be3b2..f2416fc3a31 100644 --- a/tests/helpers/test_entity_component.py +++ b/tests/helpers/test_entity_component.py @@ -184,7 +184,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): + def test_update_state_adds_entities_with_update_before_add_true(self): """Test if call update before add to state machine.""" component = EntityComponent(_LOGGER, DOMAIN, self.hass) @@ -197,7 +197,7 @@ class TestHelpersEntityComponent(unittest.TestCase): assert 1 == len(self.hass.states.entity_ids()) assert ent.update.called - def test_update_state_adds_entities_with_update_befor_add_false(self): + def test_update_state_adds_entities_with_update_before_add_false(self): """Test if not call update before add to state machine.""" component = EntityComponent(_LOGGER, DOMAIN, self.hass) @@ -579,7 +579,7 @@ def test_platform_not_ready(hass): @asyncio.coroutine -def test_pararell_updates_async_platform(hass): +def test_parallel_updates_async_platform(hass): """Warn we log when platform setup takes a long time.""" platform = MockPlatform() @@ -606,7 +606,7 @@ def test_pararell_updates_async_platform(hass): @asyncio.coroutine -def test_pararell_updates_async_platform_with_constant(hass): +def test_parallel_updates_async_platform_with_constant(hass): """Warn we log when platform setup takes a long time.""" platform = MockPlatform() @@ -634,7 +634,7 @@ def test_pararell_updates_async_platform_with_constant(hass): @asyncio.coroutine -def test_pararell_updates_sync_platform(hass): +def test_parallel_updates_sync_platform(hass): """Warn we log when platform setup takes a long time.""" platform = MockPlatform() diff --git a/tests/helpers/test_entityfilter.py b/tests/helpers/test_entityfilter.py index 797cd257833..944224a34d1 100644 --- a/tests/helpers/test_entityfilter.py +++ b/tests/helpers/test_entityfilter.py @@ -1,4 +1,4 @@ -"""The tests for the EntityFitler component.""" +"""The tests for the EntityFilter component.""" from homeassistant.helpers.entityfilter import generate_filter diff --git a/tests/helpers/test_service.py b/tests/helpers/test_service.py index 31d98633ef8..a5bd6798084 100644 --- a/tests/helpers/test_service.py +++ b/tests/helpers/test_service.py @@ -28,7 +28,7 @@ class TestServiceHelpers(unittest.TestCase): self.hass.stop() def test_template_service_call(self): - """Test service call with tempating.""" + """Test service call with templating.""" config = { 'service_template': '{{ \'test_domain.test_service\' }}', 'entity_id': 'hello.world', @@ -102,7 +102,7 @@ class TestServiceHelpers(unittest.TestCase): @patch('homeassistant.helpers.service._LOGGER.error') def test_fail_silently_if_no_service(self, mock_log): - """Test failling if service is missing.""" + """Test failing if service is missing.""" service.call_from_config(self.hass, None) self.assertEqual(1, mock_log.call_count) diff --git a/tests/util/test_distance.py b/tests/util/test_distance.py index 7f04f6f0569..2ad3b42fdb8 100644 --- a/tests/util/test_distance.py +++ b/tests/util/test_distance.py @@ -1,4 +1,4 @@ -"""Test homeasssitant distance utility functions.""" +"""Test homeassistant distance utility functions.""" import unittest import homeassistant.util.distance as distance_util