Clean up access to config in various integrations v5 (#34206)

This commit is contained in:
springstan 2020-04-15 14:10:07 +02:00 committed by GitHub
parent 1ea7229f32
commit d842dacfd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 58 additions and 58 deletions

View file

@ -49,11 +49,11 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Deluge sensors."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
port = config.get(CONF_PORT)
name = config[CONF_NAME]
host = config[CONF_HOST]
username = config[CONF_USERNAME]
password = config[CONF_PASSWORD]
port = config[CONF_PORT]
deluge_api = DelugeRPCClient(host, port, username, password)
try: