Clean up access to config in various integrations v2 (#33763)

This commit is contained in:
springstan authored and GitHub committed 2020-04-07 22:45:56 +02:00
1 parent d95ffb3aa3
commit d7e3b0b755
20 files changed
+59 -59

No files matched your search

@@ -31,10 +31,10 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up PwrCtrl devices/switches."""
host = config.get(CONF_HOST)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
port_recv = config.get(CONF_PORT_RECV)
port_send = config.get(CONF_PORT_SEND)
username = config[CONF_USERNAME]
password = config[CONF_PASSWORD]
port_recv = config[CONF_PORT_RECV]
port_send = config[CONF_PORT_SEND]
try:
master = DeviceMaster(