Clean up access to config in various integrations v5 (#34206)
This commit is contained in:
parent
1ea7229f32
commit
d842dacfd6
21 changed files with 58 additions and 58 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue