Clean up access to config in various integrations v4 (#34174)
* Clean up access to config in various integrations v4 * Address review comments
This commit is contained in:
1 parent
96aaa25aad
commit
e2af216bcd
20 files changed
+53
-55
No files matched your search
@@ -40,9 +40,9 @@ CANARY_COMPONENTS = ["alarm_control_panel", "camera", "sensor"]
|
||||
def setup(hass, config):
|
||||
"""Set up the Canary component."""
|
||||
conf = config[DOMAIN]
|
||||
username = conf.get(CONF_USERNAME)
|
||||
password = conf.get(CONF_PASSWORD)
|
||||
timeout = conf.get(CONF_TIMEOUT)
|
||||
username = conf[CONF_USERNAME]
|
||||
password = conf[CONF_PASSWORD]
|
||||
timeout = conf[CONF_TIMEOUT]
|
||||
|
||||
try:
|
||||
hass.data[DATA_CANARY] = CanaryData(username, password, timeout)
|
||||
|
||||
@@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
location,
|
||||
device,
|
||||
DEFAULT_TIMEOUT,
|
||||
config.get(CONF_FFMPEG_ARGUMENTS),
|
||||
config[CONF_FFMPEG_ARGUMENTS],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user