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
|
@ -23,10 +23,13 @@ REQUIREMENTS = ['fedexdeliverymanager==1.0.2']
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = 'fedex'
|
||||
COOKIE = 'fedexdeliverymanager_cookies.pickle'
|
||||
CONF_UPDATE_INTERVAL = 'update_interval'
|
||||
COOKIE = 'fedexdeliverymanager_cookies.pickle'
|
||||
|
||||
DOMAIN = 'fedex'
|
||||
|
||||
ICON = 'mdi:package-variant-closed'
|
||||
|
||||
STATUS_DELIVERED = 'delivered'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
|
@ -40,19 +43,19 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||
|
||||
# pylint: disable=unused-argument
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Setup the Fedex platform."""
|
||||
"""Set up the Fedex platform."""
|
||||
import fedexdeliverymanager
|
||||
try:
|
||||
cookie = hass.config.path(COOKIE)
|
||||
session = fedexdeliverymanager.get_session(config.get(CONF_USERNAME),
|
||||
config.get(CONF_PASSWORD),
|
||||
cookie_path=cookie)
|
||||
session = fedexdeliverymanager.get_session(
|
||||
config.get(CONF_USERNAME), config.get(CONF_PASSWORD),
|
||||
cookie_path=cookie)
|
||||
except fedexdeliverymanager.FedexError:
|
||||
_LOGGER.exception('Could not connect to Fedex Delivery Manager')
|
||||
_LOGGER.exception("Could not connect to Fedex Delivery Manager")
|
||||
return False
|
||||
|
||||
add_devices([FedexSensor(session, config.get(CONF_NAME),
|
||||
config.get(CONF_UPDATE_INTERVAL))])
|
||||
add_devices([FedexSensor(
|
||||
session, config.get(CONF_NAME), config.get(CONF_UPDATE_INTERVAL))])
|
||||
|
||||
|
||||
class FedexSensor(Entity):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue