Spelling fixes ()

* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
pull/12042/head
Otto Winter 2018-01-29 23:37:19 +01:00 committed by Fabian Affolter
parent 38fd9b65bf
commit 8dcfd35b8b
138 changed files with 285 additions and 286 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: {}<br />'
'You will need to restart hass after fixing.'

View File

@ -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)):

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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."""

View File

@ -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:

View File

@ -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,

View File

@ -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)

View File

@ -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):

View File

@ -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),

View File

@ -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.

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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()

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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'

View File

@ -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()

View File

@ -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. "

View File

@ -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,

View File

@ -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/

View File

@ -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)

View File

@ -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."""

View File

@ -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,

View File

@ -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

View File

@ -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]

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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."""

View File

@ -45,7 +45,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
SERVICE_CALL_METHOD = 'squeezebox_call_method'
DATA_SQUEEZEBOX = 'squeexebox'
DATA_SQUEEZEBOX = 'squeezebox'
ATTR_PARAMETERS = 'parameters'

View File

@ -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})

View File

@ -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.
"""

View File

@ -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

View File

@ -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:

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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"],

View File

@ -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'],

View File

@ -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,

View File

@ -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':

View File

@ -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'

View File

@ -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

View File

@ -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'],

View File

@ -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():

View File

@ -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:

View File

@ -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

View File

@ -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/

View File

@ -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]

View File

@ -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:

View File

@ -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)

View File

@ -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,

View File

@ -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

View File

@ -1,4 +1,4 @@
"""Component to manage a shoppling list."""
"""Component to manage a shopping list."""
import asyncio
import json
import logging

View File

@ -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:

View File

@ -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:

View File

@ -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)

View File

@ -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,

View File

@ -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):

View File

@ -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)
)
)

View File

@ -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)

View File

@ -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 = {

View File

@ -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] = {

View File

@ -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]

View File

@ -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 = []

View File

@ -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/

View File

@ -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)

View File

@ -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/

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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())

View File

@ -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(

View File

@ -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):

Some files were not shown because too many files have changed in this diff Show More