Spelling fixes (#12041)
* Spelling fixes *Lots* of them. * Spelling breaking changes * Fix lint errors
This commit is contained in:
1 parent
38fd9b65bf
commit
8dcfd35b8b
138 files changed
+285
-286
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user