Spelling fixes (#11940)

This commit is contained in:
Ville Skyttä 2018-01-27 21:58:27 +02:00 committed by Paulus Schoutsen
parent 94316f07a2
commit 55ee8959ba
80 changed files with 110 additions and 110 deletions

View file

@ -41,7 +41,7 @@ homeassistant/components/*/zwave.py @home-assistant/z-wave
homeassistant/components/hassio.py @home-assistant/hassio
# Indiviudal components
# Individual components
homeassistant/components/alarm_control_panel/egardia.py @jeroenterheerdt
homeassistant/components/camera/yi.py @bachya
homeassistant/components/climate/ephember.py @ttroy50

View file

@ -133,7 +133,7 @@ def async_setup(hass, config):
# have been processed. If a service does not exist it causes a 10
# second delay while we're blocking waiting for a response.
# But services can be registered on other HA instances that are
# listening to the bus too. So as a in between solution, we'll
# listening to the bus too. So as an in between solution, we'll
# block only if the service is defined in the current HA instance.
blocking = hass.services.has_service(domain, service.service)

View file

@ -624,7 +624,7 @@ def async_api_set_brightness(hass, config, request, entity):
@extract_entity
@asyncio.coroutine
def async_api_adjust_brightness(hass, config, request, entity):
"""Process a adjust brightness request."""
"""Process an adjust brightness request."""
brightness_delta = int(request[API_PAYLOAD]['brightnessDelta'])
# read current state
@ -812,7 +812,7 @@ def async_api_set_percentage(hass, config, request, entity):
@extract_entity
@asyncio.coroutine
def async_api_adjust_percentage(hass, config, request, entity):
"""Process a adjust percentage request."""
"""Process an adjust percentage request."""
percentage_delta = int(request[API_PAYLOAD]['percentageDelta'])
service = None
data = {ATTR_ENTITY_ID: entity.entity_id}
@ -873,7 +873,7 @@ def async_api_lock(hass, config, request, entity):
@extract_entity
@asyncio.coroutine
def async_api_unlock(hass, config, request, entity):
"""Process a unlock request."""
"""Process an unlock request."""
yield from hass.services.async_call(entity.domain, SERVICE_UNLOCK, {
ATTR_ENTITY_ID: entity.entity_id
}, blocking=False)
@ -904,7 +904,7 @@ def async_api_set_volume(hass, config, request, entity):
@extract_entity
@asyncio.coroutine
def async_api_adjust_volume(hass, config, request, entity):
"""Process a adjust volume request."""
"""Process an adjust volume request."""
volume_delta = int(request[API_PAYLOAD]['volume'])
current_level = entity.attributes.get(media_player.ATTR_MEDIA_VOLUME_LEVEL)

View file

@ -59,5 +59,5 @@ class HiveBinarySensorEntity(BinarySensorDevice):
self.node_device_type)
def update(self):
"""Update all Node data frome Hive."""
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)

View file

@ -83,5 +83,5 @@ class InsteonPLMBinarySensorDevice(BinarySensorDevice):
@callback
def async_binarysensor_update(self, message):
"""Receive notification from transport that new data exists."""
_LOGGER.info("Received update calback from PLM for %s", self._address)
_LOGGER.info("Received update callback from PLM for %s", self._address)
self._hass.async_add_job(self.async_update_ha_state())

View file

@ -39,7 +39,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
sensor_type))
else:
# create an sensor for each zone managed by faucet
# create a sensor for each zone managed by faucet
for zone in raincloud.controller.faucet.zones:
sensors.append(RainCloudBinarySensor(zone, sensor_type))

View file

@ -62,7 +62,7 @@ class WemoBinarySensor(BinarySensorDevice):
@property
def name(self):
"""Return the name of the sevice if any."""
"""Return the name of the service if any."""
return self.wemo.name
@property

View file

@ -174,7 +174,7 @@ class WebDavCalendarData(object):
@staticmethod
def is_matching(vevent, search):
"""Return if the event matches the filter critera."""
"""Return if the event matches the filter criteria."""
if search is None:
return True

View file

@ -411,7 +411,7 @@ class TodoistProjectData(object):
The "best" event is determined by the following criteria:
* A proposed event must not be completed
* A proposed event must have a end date (otherwise we go with
* A proposed event must have an end date (otherwise we go with
the event at index 0, selected above)
* A proposed event must be on the same day or earlier as our
current event

View file

@ -91,13 +91,13 @@ def async_snapshot(hass, filename, entity_id=None):
@bind_hass
@asyncio.coroutine
def async_get_image(hass, entity_id, timeout=10):
"""Fetch a image from a camera entity."""
"""Fetch an image from a camera entity."""
websession = async_get_clientsession(hass)
state = hass.states.get(entity_id)
if state is None:
raise HomeAssistantError(
"No entity '{0}' for grab a image".format(entity_id))
"No entity '{0}' for grab an image".format(entity_id))
url = "{0}{1}".format(
hass.config.api.base_url,

View file

@ -207,7 +207,7 @@ class DemoClimate(ClimateDevice):
self.schedule_update_ha_state()
def turn_aux_heat_on(self):
"""Turn auxillary heater on."""
"""Turn auxiliary heater on."""
self._aux = True
self.schedule_update_ha_state()

View file

@ -55,7 +55,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
# pylint: disable=import-error
class EQ3BTSmartThermostat(ClimateDevice):
"""Representation of a eQ-3 Bluetooth Smart thermostat."""
"""Representation of an eQ-3 Bluetooth Smart thermostat."""
def __init__(self, _mac, _name):
"""Initialize the thermostat."""

View file

@ -174,5 +174,5 @@ class HiveClimateEntity(ClimateDevice):
entity.handle_update(self.data_updatesource)
def update(self):
"""Update all Node data frome Hive."""
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)

View file

@ -565,7 +565,7 @@ class MqttClimate(MqttAvailability, ClimateDevice):
@asyncio.coroutine
def async_turn_aux_heat_on(self):
"""Turn auxillary heater on."""
"""Turn auxiliary heater on."""
if self._topic[CONF_AUX_COMMAND_TOPIC] is not None:
mqtt.async_publish(self.hass, self._topic[CONF_AUX_COMMAND_TOPIC],
self._payload_on, self._qos, self._retain)
@ -576,7 +576,7 @@ class MqttClimate(MqttAvailability, ClimateDevice):
@asyncio.coroutine
def async_turn_aux_heat_off(self):
"""Turn auxillary heater off."""
"""Turn auxiliary heater off."""
if self._topic[CONF_AUX_COMMAND_TOPIC] is not None:
mqtt.async_publish(self.hass, self._topic[CONF_AUX_COMMAND_TOPIC],
self._payload_off, self._qos, self._retain)

View file

@ -249,7 +249,7 @@ class TadoClimate(ClimateDevice):
data = self._store.get_data(self._data_id)
if data is None:
_LOGGER.debug("Recieved no data for zone %s", self.zone_name)
_LOGGER.debug("Received no data for zone %s", self.zone_name)
return
if 'sensorDataPoints' in data:
@ -317,7 +317,7 @@ class TadoClimate(ClimateDevice):
fan_speed = setting_data['fanSpeed']
if self._device_is_active:
# If you set mode manualy to off, there will be an overlay
# If you set mode manually to off, there will be an overlay
# and a termination, but we want to see the mode "OFF"
self._overlay_mode = termination
self._current_operation = termination

View file

@ -158,7 +158,7 @@ class ZwaveGarageDoorBarrier(ZwaveGarageDoorBase):
@property
def is_closing(self):
"""Return true if cover is in an closing state."""
"""Return true if cover is in a closing state."""
return self._state == "Closing"
@property

View file

@ -42,7 +42,7 @@ Device = namedtuple('Device', ['mac', 'ip', 'last_update'])
class ActiontecDeviceScanner(DeviceScanner):
"""This class queries a an actiontec router for connected devices."""
"""This class queries an actiontec router for connected devices."""
def __init__(self, config):
"""Initialize the scanner."""

View file

@ -59,7 +59,7 @@ def setup(hass, config):
payload, fullurl, req.status_code)
def update_emoncms(time):
"""Send whitelisted entities states reguarly to Emoncms."""
"""Send whitelisted entities states regularly to Emoncms."""
payload_dict = {}
for entity_id in whitelist:

View file

@ -200,7 +200,7 @@ class XiaomiAirPurifier(FanEntity):
@asyncio.coroutine
def _try_command(self, mask_error, func, *args, **kwargs):
"""Call a air purifier command handling error messages."""
"""Call an air purifier command handling error messages."""
from miio import DeviceException
try:
result = yield from self.hass.async_add_job(

View file

@ -407,7 +407,7 @@ def async_setup_themes(hass, themes):
@callback
def set_theme(call):
"""Set backend-prefered theme."""
"""Set backend-preferred theme."""
data = call.data
name = data[CONF_NAME]
if name == DEFAULT_THEME or name in hass.data[DATA_THEMES]:

View file

@ -79,7 +79,7 @@ class SmartHomeError(Exception):
"""Log error code."""
super(SmartHomeError, self).__init__(msg)
_LOGGER.error(
"An error has ocurred in Google SmartHome: %s."
"An error has occurred in Google SmartHome: %s."
"Error code: %s", msg, code
)
self.code = code
@ -96,7 +96,7 @@ class Config:
def entity_to_device(entity: Entity, config: Config, units: UnitSystem):
"""Convert a hass entity into an google actions device."""
"""Convert a hass entity into a google actions device."""
entity_config = config.entity_config.get(entity.entity_id, {})
google_domain = entity_config.get(CONF_TYPE)
class_data = MAPPING_COMPONENT.get(

View file

@ -466,7 +466,7 @@ def _system_callback_handler(hass, config, src, *args):
hass, discovery_type, addresses, interface)
# When devices of this type are found
# they are setup in HASS and an discovery event is fired
# they are setup in HASS and a discovery event is fired
if found_devices:
discovery.load_platform(hass, component_name, DOMAIN, {
ATTR_DISCOVER_DEVICES: found_devices

View file

@ -13,7 +13,7 @@ virtualkey:
description: Event to send i.e. PRESS_LONG, PRESS_SHORT.
example: PRESS_LONG
interface:
description: (Optional) for set a interface value.
description: (Optional) for set an interface value.
example: Interfaces name from config
set_variable_value:
@ -42,7 +42,7 @@ set_device_value:
description: Event to send i.e. PRESS_LONG, PRESS_SHORT
example: PRESS_LONG
interface:
description: (Optional) for set a interface value
description: (Optional) for set an interface value
example: Interfaces name from config
value:
description: New value

View file

@ -60,7 +60,7 @@ SERVICE_SCAN_SCHEMA = vol.Schema({
@bind_hass
def scan(hass, entity_id=None):
"""Force process a image."""
"""Force process an image."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else None
hass.services.call(DOMAIN, SERVICE_SCAN, data)

View file

@ -137,5 +137,5 @@ class HiveDeviceLight(Light):
return supported_features
def update(self):
"""Update all Node data frome Hive."""
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)

View file

@ -101,7 +101,7 @@ class InsteonPLMDimmerDevice(Light):
@callback
def async_light_update(self, message):
"""Receive notification from transport that new data exists."""
_LOGGER.info("Received update calback from PLM for %s", self._address)
_LOGGER.info("Received update callback from PLM for %s", self._address)
self._hass.async_add_job(self.async_update_ha_state())
@asyncio.coroutine

View file

@ -62,7 +62,7 @@ class MochadLight(Light):
@property
def brightness(self):
"""Return the birghtness of this light between 0..255."""
"""Return the brightness of this light between 0..255."""
return self._brightness
def _get_device_status(self):

View file

@ -1,5 +1,5 @@
"""
LIRC interface to receive signals from a infrared remote control.
LIRC interface to receive signals from an infrared remote control.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/lirc/

View file

@ -133,7 +133,7 @@ class MailboxEntity(Entity):
class Mailbox(object):
"""Represent an mailbox device."""
"""Represent a mailbox device."""
def __init__(self, hass, name):
"""Initialize mailbox object."""

View file

@ -49,7 +49,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
def async_anthemav_update_callback(message):
"""Receive notification from transport that new data exists."""
_LOGGER.info("Received update calback from AVR: %s", message)
_LOGGER.info("Received update callback from AVR: %s", message)
hass.async_add_job(device.async_update_ha_state())
avr = yield from anthemav.Connection.create(

View file

@ -150,10 +150,10 @@ class BluesoundPlayer(MediaPlayerDevice):
self._port = DEFAULT_PORT
@staticmethod
def _try_get_index(string, seach_string):
def _try_get_index(string, search_string):
"""Get the index."""
try:
return string.index(seach_string)
return string.index(search_string)
except ValueError:
return -1

View file

@ -77,7 +77,7 @@ class CmusDevice(MediaPlayerDevice):
"""Get the latest data and update the state."""
status = self.cmus.get_status_dict()
if not status:
_LOGGER.warning("Recieved no status from cmus")
_LOGGER.warning("Received no status from cmus")
else:
self.status = status

View file

@ -108,7 +108,7 @@ class DenonDevice(MediaPlayerDevice):
if not line:
break
lines.append(line.decode('ASCII').strip())
_LOGGER.debug("Recived: %s", line)
_LOGGER.debug("Received: %s", line)
if all_lines:
return lines

View file

@ -103,7 +103,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class MonopriceZone(MediaPlayerDevice):
"""Representation of a a Monoprice amplifier zone."""
"""Representation of a Monoprice amplifier zone."""
def __init__(self, monoprice, sources, zone_id, zone_name):
"""Initialize new zone."""

View file

@ -473,7 +473,7 @@ class SqueezeBoxDevice(MediaPlayerDevice):
return self.async_query('playlist', 'play', media_id)
def _add_uri_to_playlist(self, media_id):
"""Add a items to the existing playlist."""
"""Add an item to the existing playlist."""
return self.async_query('playlist', 'add', media_id)
def async_set_shuffle(self, shuffle):

View file

@ -337,7 +337,7 @@ class MicrosoftFace(object):
@asyncio.coroutine
def call_api(self, method, function, data=None, binary=False,
params=None):
"""Make a api call."""
"""Make an api call."""
headers = {"Ocp-Apim-Subscription-Key": self._api_key}
url = self._server_url.format(function)

View file

@ -112,13 +112,13 @@ class ApnsDevice(object):
self.device_disabled = True
def __eq__(self, other):
"""Return the comparision."""
"""Return the comparison."""
if isinstance(other, self.__class__):
return self.push_id == other.push_id and self.name == other.name
return NotImplemented
def __ne__(self, other):
"""Return the comparision."""
"""Return the comparison."""
return not self.__eq__(other)

View file

@ -390,7 +390,7 @@ class RflinkCommand(RflinkDevice):
"""Cancel queued signal repetition commands.
For example when user changed state while repetitions are still
queued for broadcast. Or when a incoming Rflink command (remote
queued for broadcast. Or when an incoming Rflink command (remote
switch) changes the state.
"""
# cancel any outstanding tasks from the previous state change

View file

@ -238,7 +238,7 @@ class BME680Handler:
self._gas_sensor_running = True
# Pause to allow inital data read for device validation.
# Pause to allow initial data read for device validation.
sleep(1)
start_time = time()

View file

@ -93,8 +93,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
device.telegram = telegram
hass.async_add_job(device.async_update_ha_state())
# Creates a asyncio.Protocol factory for reading DSMR telegrams from serial
# and calls update_entities_telegram to update entities on arrival
# Creates an asyncio.Protocol factory for reading DSMR telegrams from
# serial and calls update_entities_telegram to update entities on arrival
if config[CONF_HOST]:
reader_factory = partial(
create_tcp_dsmr_reader, config[CONF_HOST], config[CONF_PORT],

View file

@ -122,7 +122,7 @@ class EddystoneTemp(Entity):
class Monitor(object):
"""Continously scan for BLE advertisements."""
"""Continuously scan for BLE advertisements."""
def __init__(self, hass, devices, bt_device_id):
"""Construct interface object."""
@ -150,7 +150,7 @@ class Monitor(object):
self.scanning = False
def start(self):
"""Continously scan for BLE advertisements."""
"""Continuously scan for BLE advertisements."""
if not self.scanning:
self.scanner.start()
self.scanning = True

View file

@ -65,7 +65,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class EightHeatSensor(EightSleepHeatEntity):
"""Representation of a eight sleep heat-based sensor."""
"""Representation of an eight sleep heat-based sensor."""
def __init__(self, name, eight, sensor):
"""Initialize the sensor."""
@ -116,7 +116,7 @@ class EightHeatSensor(EightSleepHeatEntity):
class EightUserSensor(EightSleepUserEntity):
"""Representation of a eight sleep user-based sensor."""
"""Representation of an eight sleep user-based sensor."""
def __init__(self, name, eight, sensor, units):
"""Initialize the sensor."""
@ -232,7 +232,7 @@ class EightUserSensor(EightSleepUserEntity):
class EightRoomSensor(EightSleepUserEntity):
"""Representation of a eight sleep room sensor."""
"""Representation of an eight sleep room sensor."""
def __init__(self, name, eight, sensor, units):
"""Initialize the sensor."""

View file

@ -1,5 +1,5 @@
"""
Parse prices of a item from gearbest.
Parse prices of an item from gearbest.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.gearbest/

View file

@ -48,5 +48,5 @@ class HiveSensorEntity(Entity):
return self.session.sensor.hub_online_status(self.node_id)
def update(self):
"""Update all Node data frome Hive."""
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)

View file

@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
RainCloudSensor(raincloud.controller.faucet,
sensor_type))
else:
# create an sensor for each zone managed by a faucet
# create a sensor for each zone managed by a faucet
for zone in raincloud.controller.faucet.zones:
sensors.append(RainCloudSensor(zone, sensor_type))

View file

@ -147,7 +147,7 @@ class TadoSensor(Entity):
data = self._store.get_data(self._data_id)
if data is None:
_LOGGER.debug("Recieved no data for zone %s", self.zone_name)
_LOGGER.debug("Received no data for zone %s", self.zone_name)
return
unit = TEMP_CELSIUS

View file

@ -19,7 +19,7 @@ from homeassistant.util import slugify
class WFSensorConfig(object):
"""Water Furnace Sensor configuration."""
def __init__(self, friendly_name, field, icon="mdi:guage",
def __init__(self, friendly_name, field, icon="mdi:gauge",
unit_of_measurement=None):
"""Initialize configuration."""
self.friendly_name = friendly_name

View file

@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class AcerSwitch(SwitchDevice):
"""Represents an Acer Projector as an switch."""
"""Represents an Acer Projector as a switch."""
def __init__(self, serial_port, name, timeout, write_timeout, **kwargs):
"""Init of the Acer projector."""

View file

@ -100,7 +100,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
packet = yield from hass.async_add_job(
broadlink_device.check_data)
if packet:
log_msg = "Recieved packet is: {}".\
log_msg = "Received packet is: {}".\
format(b64encode(packet).decode('utf8'))
_LOGGER.info(log_msg)
hass.components.persistent_notification.async_create(

View file

@ -73,7 +73,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class DINRelay(SwitchDevice):
"""Representation of a individual DIN III relay port."""
"""Representation of an individual DIN III relay port."""
def __init__(self, controller_name, parent_device, outlet):
"""Initialize the DIN III Relay switch."""

View file

@ -210,7 +210,7 @@ class FluxSwitch(SwitchDevice):
else:
temp = self._start_colortemp + temp_offset
else:
# Nightime
# Night time
time_state = 'night'
if now < stop_time:

View file

@ -65,5 +65,5 @@ class HiveDevicePlug(SwitchDevice):
entity.handle_update(self.data_updatesource)
def update(self):
"""Update all Node data frome Hive."""
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)

View file

@ -83,7 +83,7 @@ class InsteonPLMSwitchDevice(SwitchDevice):
@callback
def async_switch_update(self, message):
"""Receive notification from transport that new data exists."""
_LOGGER.info('Received update calback from PLM for %s', self._address)
_LOGGER.info('Received update callback from PLM for %s', self._address)
self._hass.async_add_job(self.async_update_ha_state())
@asyncio.coroutine

View file

@ -35,7 +35,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
sensors = []
for sensor_type in config.get(CONF_MONITORED_CONDITIONS):
# create an sensor for each zone managed by faucet
# create a sensor for each zone managed by faucet
for zone in raincloud.controller.faucet.zones:
sensors.append(
RainCloudSwitch(default_watering_timer,

View file

@ -155,7 +155,7 @@ class SCSGateSwitch(SwitchDevice):
class SCSGateScenarioSwitch(object):
"""Provides a SCSGate scenario switch.
This switch is always in a 'off" state, when toggled it's used to trigger
This switch is always in an 'off" state, when toggled it's used to trigger
events.
"""

View file

@ -25,7 +25,7 @@ send_message:
description: List of rows of commands, comma-separated, to make a custom keyboard.
example: '["/command1, /command2", "/command3"]'
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or ["Text button1:/button1, Text button2:/button2", "Text button3:/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
send_photo:
@ -56,7 +56,7 @@ send_photo:
description: List of rows of commands, comma-separated, to make a custom keyboard.
example: '["/command1, /command2", "/command3"]'
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
send_video:
@ -87,7 +87,7 @@ send_video:
description: List of rows of commands, comma-separated, to make a custom keyboard.
example: '["/command1, /command2", "/command3"]'
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
send_document:
@ -118,7 +118,7 @@ send_document:
description: List of rows of commands, comma-separated, to make a custom keyboard.
example: '["/command1, /command2", "/command3"]'
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
send_location:
@ -140,7 +140,7 @@ send_location:
description: List of rows of commands, comma-separated, to make a custom keyboard.
example: '["/command1, /command2", "/command3"]'
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
edit_message:
@ -165,7 +165,7 @@ edit_message:
description: Disables link previews for links in the message.
example: true
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
edit_caption:
@ -181,7 +181,7 @@ edit_caption:
description: Message body of the notification.
example: The garage door has been open for 10 minutes.
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
edit_replymarkup:
@ -194,7 +194,7 @@ edit_replymarkup:
description: The chat_id where to edit the reply_markup.
example: 12345
inline_keyboard:
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with asociated callback data.
description: List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
example: '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"], ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
answer_callback_query:

View file

@ -219,7 +219,7 @@ def get_config_value(node, value_index, tries=5):
and value.index == value_index):
return value.data
except RuntimeError:
# If we get an runtime error the dict has changed while
# If we get a runtime error the dict has changed while
# we was looking for a value, just do it again
return None if tries <= 0 else get_config_value(
node, value_index, tries=tries - 1)

View file

@ -4,7 +4,7 @@ change_association:
description: Change an association in the Z-Wave network.
fields:
association:
description: Specify add or remove assosication
description: Specify add or remove association
example: add
node_id:
description: Node id of the node to set association for.
@ -30,14 +30,14 @@ heal_network:
description: Start a Z-Wave network heal. This might take a while and will slow down the Z-Wave network greatly while it is being processed. Refer to OZW.log for progress.
fields:
return_routes:
description: Wheter or not to update the return routes from the nodes to the controller. Defaults to False.
description: Whether or not to update the return routes from the nodes to the controller. Defaults to False.
example: True
heal_node:
description: Start a Z-Wave node heal. Refer to OZW.log for progress.
fields:
return_routes:
description: Wheter or not to update the return routes from the node to the controller. Defaults to False.
description: Whether or not to update the return routes from the node to the controller. Defaults to False.
example: True
remove_node:

View file

@ -66,7 +66,7 @@ def valid_entity_id(entity_id: str) -> bool:
def valid_state(state: str) -> bool:
"""Test if an state is valid."""
"""Test if a state is valid."""
return len(state) < 256
@ -777,7 +777,7 @@ class ServiceCall(object):
self.call_id = call_id
def __repr__(self):
"""Return the represenation of the service."""
"""Return the representation of the service."""
if self.data:
return "<ServiceCall {}.{}: {}>".format(
self.domain, self.service, util.repr_helper(self.data))

View file

@ -268,7 +268,7 @@ class Entity(object):
self.entity_id, state, attr, self.force_update)
def schedule_update_ha_state(self, force_refresh=False):
"""Schedule a update ha state change task.
"""Schedule an update ha state change task.
That avoid executor dead looks.
"""
@ -276,7 +276,7 @@ class Entity(object):
@callback
def async_schedule_update_ha_state(self, force_refresh=False):
"""Schedule a update ha state change task."""
"""Schedule an update ha state change task."""
self.hass.async_add_job(self.async_update_ha_state(force_refresh))
@asyncio.coroutine

View file

@ -119,7 +119,7 @@ track_template = threaded_listener_factory(async_track_template)
@bind_hass
def async_track_same_state(hass, period, action, async_check_same_func,
entity_ids=MATCH_ALL):
"""Track the state of entities for a period and run a action.
"""Track the state of entities for a period and run an action.
If async_check_func is None it use the state of orig_value.
Without entity_ids we track all state changes.

View file

@ -148,7 +148,7 @@ def get_component(comp_name) -> Optional[ModuleType]:
# a namespace. We do not care about namespaces.
# This prevents that when only
# custom_components/switch/some_platform.py exists,
# the import custom_components.switch would succeeed.
# the import custom_components.switch would succeed.
if module.__spec__.origin == 'namespace':
continue

View file

@ -227,7 +227,7 @@ class OrderedSet(MutableSet):
return '%s(%r)' % (self.__class__.__name__, list(self))
def __eq__(self, other):
"""Return the comparision."""
"""Return the comparison."""
if isinstance(other, OrderedSet):
return len(self) == len(other) and list(self) == list(other)
return set(self) == set(other)

View file

@ -23,7 +23,7 @@ class HideSensitiveDataFilter(logging.Filter):
# pylint: disable=invalid-name
class AsyncHandler(object):
"""Logging handler wrapper to add a async layer."""
"""Logging handler wrapper to add an async layer."""
def __init__(self, loop, handler):
"""Initialize async logging handler wrapper."""

View file

@ -83,7 +83,7 @@ class TestGetImage(object):
@patch('homeassistant.components.camera.demo.DemoCamera.camera_image',
autospec=True, return_value=b'Test')
def test_get_image_from_camera(self, mock_camera):
"""Grab a image from camera entity."""
"""Grab an image from camera entity."""
self.hass.start()
image = run_coroutine_threadsafe(camera.async_get_image(

View file

@ -139,12 +139,12 @@ class TestComponentsDeviceTrackerUnifiDirect(unittest.TestCase):
devices = scanner._get_update() # pylint: disable=protected-access
self.assertTrue(devices is None)
def test_good_reponse_parses(self):
def test_good_response_parses(self):
"""Test that the response form the AP parses to JSON correctly."""
response = _response_to_json(load_fixture('unifi_direct.txt'))
self.assertTrue(response != {})
def test_bad_reponse_returns_none(self):
def test_bad_response_returns_none(self):
"""Test that a bad response form the AP parses to JSON correctly."""
self.assertTrue(_response_to_json("{(}") == {})

View file

@ -304,7 +304,7 @@ def test_query_climate_request_f(hass_fixture, assistant_client):
@asyncio.coroutine
def test_execute_request(hass_fixture, assistant_client):
"""Test a execute request."""
"""Test an execute request."""
reqid = '5711642932632160985'
data = {
'requestId':

View file

@ -82,7 +82,7 @@ class TestImageProcessing(object):
@patch('homeassistant.components.camera.demo.DemoCamera.camera_image',
autospec=True, return_value=b'Test')
def test_get_image_from_camera(self, mock_camera):
"""Grab a image from camera entity."""
"""Grab an image from camera entity."""
self.hass.start()
ip.scan(self.hass, entity_id='image_processing.test')

View file

@ -156,7 +156,7 @@ class TestLiteJetLight(unittest.TestCase):
# (Requesting the level is not strictly needed with a deactivated
# event but the implementation happens to do it. This could be
# changed to a assert_not_called in the future.)
# changed to an assert_not_called in the future.)
self.mock_lj.get_load_level.assert_called_with(
ENTITY_OTHER_LIGHT_NUMBER)

View file

@ -152,7 +152,7 @@ class TestSonosMediaPlayer(unittest.TestCase):
@mock.patch('socket.create_connection', side_effect=socket.error())
@mock.patch('soco.discover')
def test_ensure_setup_config_interface_addr(self, discover_mock, *args):
"""Test a interface address config'd by the HASS config file."""
"""Test an interface address config'd by the HASS config file."""
discover_mock.return_value = {SoCoMock('192.0.2.1')}
config = {
@ -172,7 +172,7 @@ class TestSonosMediaPlayer(unittest.TestCase):
@mock.patch('soco.discover')
def test_ensure_setup_config_advertise_addr(self, discover_mock,
*args):
"""Test a advertise address config'd by the HASS config file."""
"""Test an advertise address config'd by the HASS config file."""
discover_mock.return_value = {SoCoMock('192.0.2.1')}
config = {

View file

@ -44,7 +44,7 @@ class TestYamahaMediaPlayer(unittest.TestCase):
self.hass.stop()
def enable_output(self, port, enabled):
"""Enable ouput on a specific port."""
"""Enable output on a specific port."""
data = {
'entity_id': 'media_player.yamaha_receiver_main_zone',
'port': port,

View file

@ -25,7 +25,7 @@ def create_engine_test(*args, **kwargs):
@asyncio.coroutine
def test_schema_update_calls(hass):
"""Test that schema migrations occurr in correct order."""
"""Test that schema migrations occur in correct order."""
with patch('sqlalchemy.create_engine', new=create_engine_test), \
patch('homeassistant.components.recorder.migration._apply_update') as \
update:

View file

@ -110,7 +110,7 @@ def test_derivative():
yield from entity.async_update()
assert entity.state == STATE_UNKNOWN, \
'state after first update shoudl still be unknown'
'state after first update should still be unknown'
entity.telegram = {
'1.0.0': MBusObject([

View file

@ -435,7 +435,7 @@ class TestDialogflow(unittest.TestCase):
self.assertEqual("virgo", call.data.get("hello"))
def test_intent_with_no_action(self):
"""Test a intent with no defined action."""
"""Test an intent with no defined action."""
data = {
"id": REQUEST_ID,
"timestamp": REQUEST_TIMESTAMP,
@ -480,7 +480,7 @@ class TestDialogflow(unittest.TestCase):
"You have not defined an action in your Dialogflow intent.", text)
def test_intent_with_unknown_action(self):
"""Test a intent with an action not defined in the conf."""
"""Test an intent with an action not defined in the conf."""
data = {
"id": REQUEST_ID,
"timestamp": REQUEST_TIMESTAMP,

View file

@ -224,7 +224,7 @@ class TestTTSYandexPlatform(object):
assert len(calls) == 0
def test_service_say_specifed_speaker(self, aioclient_mock):
def test_service_say_specified_speaker(self, aioclient_mock):
"""Test service call say."""
calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA)
@ -259,7 +259,7 @@ class TestTTSYandexPlatform(object):
assert len(aioclient_mock.mock_calls) == 1
assert len(calls) == 1
def test_service_say_specifed_emotion(self, aioclient_mock):
def test_service_say_specified_emotion(self, aioclient_mock):
"""Test service call say."""
calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA)

View file

@ -130,7 +130,7 @@ class TestHelpersEntityComponent(unittest.TestCase):
assert poll_ent.async_update.called
def test_polling_updates_entities_with_exception(self):
"""Test the updated entities that not break with a exception."""
"""Test the updated entities that not break with an exception."""
component = EntityComponent(
_LOGGER, DOMAIN, self.hass, timedelta(seconds=20))
@ -663,7 +663,7 @@ def test_raise_error_on_update(hass):
entity2 = EntityTest(name='test_2')
def _raise():
"""Helper to raise a exception."""
"""Helper to raise an exception."""
raise AssertionError
entity1.update = _raise

View file

@ -17,7 +17,7 @@ VERSION_PATH = os.path.join(get_test_config_dir(), config_util.VERSION_FILE)
_LOGGER = logging.getLogger(__name__)
# prevent .HA_VERISON file from being written
# prevent .HA_VERSION file from being written
@patch(
'homeassistant.bootstrap.conf_util.process_ha_config_upgrade', Mock())
@patch('homeassistant.util.location.detect_location_info',

View file

@ -172,7 +172,7 @@ class TestHomeAssistant(unittest.TestCase):
assert len(call_count) == 2
def test_async_add_job_pending_tasks_executor(self):
"""Run a executor in pending tasks."""
"""Run an executor in pending tasks."""
call_count = []
def test_executor():

View file

@ -28,7 +28,7 @@ def _url(path=''):
# pylint: disable=invalid-name
def setUpModule():
"""Initalization of a Home Assistant server instance."""
"""Initialization of a Home Assistant server instance."""
global hass, master_api
hass = get_test_home_assistant()

View file

@ -48,7 +48,7 @@ class TestYaml(unittest.TestCase):
load_yaml_config_file(YAML_CONFIG_FILE)
def test_no_key(self):
"""Test item without an key."""
"""Test item without a key."""
files = {YAML_CONFIG_FILE: 'a: a\nnokeyhere'}
with self.assertRaises(HomeAssistantError), \
patch_yaml_files(files):