Skip to content

Commit

Permalink
Correctly load Mopar's config (home-assistant#22771)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohankapoorcom authored and balloob committed Apr 5, 2019
1 parent 9eb3272 commit a44966f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions homeassistant/components/mopar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ def setup(hass, config):
"""Set up the Mopar component."""
import motorparts

conf = config[DOMAIN]
cookie = hass.config.path(COOKIE_FILE)
try:
session = motorparts.get_session(
config[CONF_USERNAME],
config[CONF_PASSWORD],
config[CONF_PIN],
conf[CONF_USERNAME],
conf[CONF_PASSWORD],
conf[CONF_PIN],
cookie_path=cookie
)
except motorparts.MoparError:
Expand All @@ -69,7 +70,7 @@ def setup(hass, config):
data.update(now=None)

track_time_interval(
hass, data.update, config[CONF_SCAN_INTERVAL]
hass, data.update, conf[CONF_SCAN_INTERVAL]
)

def handle_horn(call):
Expand Down

0 comments on commit a44966f

Please sign in to comment.