Grammar and spelling fixes (#16065)
This commit is contained in:
parent
9e1fa7ef42
commit
dbd0763f83
244 changed files with 453 additions and 453 deletions
|
@ -1,4 +1,4 @@
|
||||||
"""Provide cors support for the HTTP component."""
|
"""Provide CORS support for the HTTP component."""
|
||||||
|
|
||||||
|
|
||||||
from aiohttp.hdrs import ACCEPT, ORIGIN, CONTENT_TYPE
|
from aiohttp.hdrs import ACCEPT, ORIGIN, CONTENT_TYPE
|
||||||
|
@ -17,7 +17,7 @@ ALLOWED_CORS_HEADERS = [
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def setup_cors(app, origins):
|
def setup_cors(app, origins):
|
||||||
"""Setup cors."""
|
"""Set up CORS."""
|
||||||
import aiohttp_cors
|
import aiohttp_cors
|
||||||
|
|
||||||
cors = aiohttp_cors.setup(app, defaults={
|
cors = aiohttp_cors.setup(app, defaults={
|
||||||
|
@ -30,7 +30,7 @@ def setup_cors(app, origins):
|
||||||
cors_added = set()
|
cors_added = set()
|
||||||
|
|
||||||
def _allow_cors(route, config=None):
|
def _allow_cors(route, config=None):
|
||||||
"""Allow cors on a route."""
|
"""Allow CORS on a route."""
|
||||||
if hasattr(route, 'resource'):
|
if hasattr(route, 'resource'):
|
||||||
path = route.resource
|
path = route.resource
|
||||||
else:
|
else:
|
||||||
|
@ -55,7 +55,7 @@ def setup_cors(app, origins):
|
||||||
return
|
return
|
||||||
|
|
||||||
async def cors_startup(app):
|
async def cors_startup(app):
|
||||||
"""Initialize cors when app starts up."""
|
"""Initialize CORS when app starts up."""
|
||||||
for route in list(app.router.routes()):
|
for route in list(app.router.routes()):
|
||||||
_allow_cors(route)
|
_allow_cors(route)
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ def setup(hass, config):
|
||||||
|
|
||||||
|
|
||||||
def autosetup_ihc_products(hass: HomeAssistantType, config, ihc_controller):
|
def autosetup_ihc_products(hass: HomeAssistantType, config, ihc_controller):
|
||||||
"""Auto setup of IHC products from the ihc project file."""
|
"""Auto setup of IHC products from the IHC project file."""
|
||||||
project_xml = ihc_controller.get_project()
|
project_xml = ihc_controller.get_project()
|
||||||
if not project_xml:
|
if not project_xml:
|
||||||
_LOGGER.error("Unable to read project from ICH controller")
|
_LOGGER.error("Unable to read project from ICH controller")
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
# Describes the format for available ihc services
|
# Describes the format for available IHC services
|
||||||
|
|
||||||
set_runtime_value_bool:
|
set_runtime_value_bool:
|
||||||
description: Set a boolean runtime value on the ihc controller
|
description: Set a boolean runtime value on the IHC controller
|
||||||
fields:
|
fields:
|
||||||
ihc_id:
|
ihc_id:
|
||||||
description: The integer ihc resource id
|
description: The integer IHC resource id
|
||||||
value:
|
value:
|
||||||
description: The boolean value to set
|
description: The boolean value to set
|
||||||
|
|
||||||
set_runtime_value_int:
|
set_runtime_value_int:
|
||||||
description: Set an integer runtime value on the ihc controller
|
description: Set an integer runtime value on the IHC controller
|
||||||
fields:
|
fields:
|
||||||
ihc_id:
|
ihc_id:
|
||||||
description: The integer ihc resource id
|
description: The integer IHC resource id
|
||||||
value:
|
value:
|
||||||
description: The integer value to set
|
description: The integer value to set
|
||||||
|
|
||||||
set_runtime_value_float:
|
set_runtime_value_float:
|
||||||
description: Set a float runtime value on the ihc controller
|
description: Set a float runtime value on the IHC controller
|
||||||
fields:
|
fields:
|
||||||
ihc_id:
|
ihc_id:
|
||||||
description: The integer ihc resource id
|
description: The integer IHC resource id
|
||||||
value:
|
value:
|
||||||
description: The float value to set
|
description: The float value to set
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the ihc lights platform."""
|
"""Set up the IHC lights platform."""
|
||||||
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
||||||
info = hass.data[IHC_DATA][IHC_INFO]
|
info = hass.data[IHC_DATA][IHC_INFO]
|
||||||
devices = []
|
devices = []
|
||||||
|
@ -109,7 +109,7 @@ class IhcLight(IHCDevice, Light):
|
||||||
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
|
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
|
||||||
|
|
||||||
def on_ihc_change(self, ihc_id, value):
|
def on_ihc_change(self, ihc_id, value):
|
||||||
"""Callback from Ihc notifications."""
|
"""Callback from IHC notifications."""
|
||||||
if isinstance(value, bool):
|
if isinstance(value, bool):
|
||||||
self._dimmable = False
|
self._dimmable = False
|
||||||
self._state = value != 0
|
self._state = value != 0
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Counter for the days till a HTTPS (TLS) certificate will expire.
|
Counter for the days until an HTTPS (TLS) certificate will expire.
|
||||||
|
|
||||||
For more details about this sensor please refer to the documentation at
|
For more details about this sensor please refer to the documentation at
|
||||||
https://home-assistant.io/components/sensor.cert_expiry/
|
https://home-assistant.io/components/sensor.cert_expiry/
|
||||||
|
|
|
@ -151,7 +151,7 @@ class FinTsClient:
|
||||||
|
|
||||||
|
|
||||||
class FinTsAccount(Entity):
|
class FinTsAccount(Entity):
|
||||||
"""Sensor for a FinTS balanc account.
|
"""Sensor for a FinTS balance account.
|
||||||
|
|
||||||
A balance account contains an amount of money (=balance). The amount may
|
A balance account contains an amount of money (=balance). The amount may
|
||||||
also be negative.
|
also be negative.
|
||||||
|
|
|
@ -31,7 +31,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the ihc sensor platform."""
|
"""Set up the IHC sensor platform."""
|
||||||
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
||||||
info = hass.data[IHC_DATA][IHC_INFO]
|
info = hass.data[IHC_DATA][IHC_INFO]
|
||||||
devices = []
|
devices = []
|
||||||
|
@ -77,6 +77,6 @@ class IHCSensor(IHCDevice, Entity):
|
||||||
return self._unit_of_measurement
|
return self._unit_of_measurement
|
||||||
|
|
||||||
def on_ihc_change(self, ihc_id, value):
|
def on_ihc_change(self, ihc_id, value):
|
||||||
"""Callback when ihc resource changes."""
|
"""Callback when IHC resource changes."""
|
||||||
self._state = value
|
self._state = value
|
||||||
self.schedule_update_ha_state()
|
self.schedule_update_ha_state()
|
||||||
|
|
|
@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setting the platform in HASS and Case Information."""
|
"""Set up the platform in HASS and Case Information."""
|
||||||
uscis = UscisSensor(config['case_id'], config[CONF_FRIENDLY_NAME])
|
uscis = UscisSensor(config['case_id'], config[CONF_FRIENDLY_NAME])
|
||||||
uscis.update()
|
uscis.update()
|
||||||
if uscis.valid_case_id:
|
if uscis.valid_case_id:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Sensor support for Wirelss Sensor Tags platform.
|
Sensor support for Wireless Sensor Tags platform.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/sensor.wirelesstag/
|
https://home-assistant.io/components/sensor.wirelesstag/
|
||||||
|
|
|
@ -26,7 +26,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the ihc switch platform."""
|
"""Set up the IHC switch platform."""
|
||||||
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER]
|
||||||
info = hass.data[IHC_DATA][IHC_INFO]
|
info = hass.data[IHC_DATA][IHC_INFO]
|
||||||
devices = []
|
devices = []
|
||||||
|
@ -70,6 +70,6 @@ class IHCSwitch(IHCDevice, SwitchDevice):
|
||||||
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
|
self.ihc_controller.set_runtime_value_bool(self.ihc_id, False)
|
||||||
|
|
||||||
def on_ihc_change(self, ihc_id, value):
|
def on_ihc_change(self, ihc_id, value):
|
||||||
"""Callback when the ihc resource changes."""
|
"""Callback when the IHC resource changes."""
|
||||||
self._state = value
|
self._state = value
|
||||||
self.schedule_update_ha_state()
|
self.schedule_update_ha_state()
|
||||||
|
|
|
@ -18,7 +18,7 @@ BASE_CONFIG = [{
|
||||||
|
|
||||||
async def async_setup_auth(hass, aiohttp_client, provider_configs=BASE_CONFIG,
|
async def async_setup_auth(hass, aiohttp_client, provider_configs=BASE_CONFIG,
|
||||||
setup_api=False):
|
setup_api=False):
|
||||||
"""Helper to setup authentication and create a HTTP client."""
|
"""Helper to set up authentication and create an HTTP client."""
|
||||||
hass.auth = await auth.auth_manager_from_config(hass, provider_configs)
|
hass.auth = await auth.auth_manager_from_config(hass, provider_configs)
|
||||||
ensure_auth_manager_loaded(hass.auth)
|
ensure_auth_manager_loaded(hass.auth)
|
||||||
await async_setup_component(hass, 'auth', {
|
await async_setup_component(hass, 'auth', {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue