Update docstrings (#7374)
* Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstring * Update docstrings * Update docstrings * Fix lint issues * Update docstrings * Revert changes in dict
This commit is contained in:
parent
0e08925259
commit
a4f1f6e724
340 changed files with 1533 additions and 1708 deletions
|
@ -17,8 +17,9 @@ from homeassistant.components.notify import (
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.remote import JSONEncoder
|
||||
|
||||
REQUIREMENTS = ['boto3==1.4.3']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
REQUIREMENTS = ["boto3==1.4.3"]
|
||||
|
||||
CONF_REGION = 'region_name'
|
||||
CONF_ACCESS_KEY_ID = 'aws_access_key_id'
|
||||
|
@ -28,7 +29,7 @@ CONF_CONTEXT = 'context'
|
|||
ATTR_CREDENTIALS = 'credentials'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_REGION, default="us-east-1"): cv.string,
|
||||
vol.Optional(CONF_REGION, default='us-east-1'): cv.string,
|
||||
vol.Inclusive(CONF_ACCESS_KEY_ID, ATTR_CREDENTIALS): cv.string,
|
||||
vol.Inclusive(CONF_SECRET_ACCESS_KEY, ATTR_CREDENTIALS): cv.string,
|
||||
vol.Exclusive(CONF_PROFILE_NAME, ATTR_CREDENTIALS): cv.string,
|
||||
|
@ -40,8 +41,8 @@ def get_service(hass, config, discovery_info=None):
|
|||
"""Get the AWS Lambda notification service."""
|
||||
context_str = json.dumps({'hass': hass.config.as_dict(),
|
||||
'custom': config[CONF_CONTEXT]}, cls=JSONEncoder)
|
||||
context_b64 = base64.b64encode(context_str.encode("utf-8"))
|
||||
context = context_b64.decode("utf-8")
|
||||
context_b64 = base64.b64encode(context_str.encode('utf-8'))
|
||||
context = context_b64.decode('utf-8')
|
||||
|
||||
# pylint: disable=import-error
|
||||
import boto3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue