Correctly load Mopar's config (#22771)
parent
9eb32728f1
commit
a44966f483
|
@ -53,12 +53,13 @@ def setup(hass, config):
|
||||||
"""Set up the Mopar component."""
|
"""Set up the Mopar component."""
|
||||||
import motorparts
|
import motorparts
|
||||||
|
|
||||||
|
conf = config[DOMAIN]
|
||||||
cookie = hass.config.path(COOKIE_FILE)
|
cookie = hass.config.path(COOKIE_FILE)
|
||||||
try:
|
try:
|
||||||
session = motorparts.get_session(
|
session = motorparts.get_session(
|
||||||
config[CONF_USERNAME],
|
conf[CONF_USERNAME],
|
||||||
config[CONF_PASSWORD],
|
conf[CONF_PASSWORD],
|
||||||
config[CONF_PIN],
|
conf[CONF_PIN],
|
||||||
cookie_path=cookie
|
cookie_path=cookie
|
||||||
)
|
)
|
||||||
except motorparts.MoparError:
|
except motorparts.MoparError:
|
||||||
|
@ -69,7 +70,7 @@ def setup(hass, config):
|
||||||
data.update(now=None)
|
data.update(now=None)
|
||||||
|
|
||||||
track_time_interval(
|
track_time_interval(
|
||||||
hass, data.update, config[CONF_SCAN_INTERVAL]
|
hass, data.update, conf[CONF_SCAN_INTERVAL]
|
||||||
)
|
)
|
||||||
|
|
||||||
def handle_horn(call):
|
def handle_horn(call):
|
||||||
|
|
Loading…
Reference in New Issue