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