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

+2 -2
View File
@@ -37,8 +37,8 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Use config values to set up a function enabling status retrieval."""
conf = config[DOMAIN]
host = conf.get(CONF_HOST)
port = conf.get(CONF_PORT)
host = conf[CONF_HOST]
port = conf[CONF_PORT]
apcups_data = APCUPSdData(host, port)
hass.data[DOMAIN] = apcups_data