Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: key error for CONF_API_PROXY_CERT #890

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/tesla_custom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def async_setup_entry(hass, config_entry):
# Because users can have multiple accounts, we always
# create a new session so they have separate cookies

if config[CONF_API_PROXY_CERT]:
if config.get(CONF_API_PROXY_CERT):
try:
SSL_CONTEXT.load_verify_locations(config[CONF_API_PROXY_CERT])
_LOGGER.debug(SSL_CONTEXT)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tesla_custom/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def async_step_user(self, user_input=None):
if CONF_API_PROXY_CERT in user_input:
return await self.async_step_credentials(user_input)

self.use_proxy = user_input[CONF_API_PROXY_ENABLE]
self.use_proxy = user_input.get(CONF_API_PROXY_ENABLE, False)
return await self.async_step_credentials()

async def async_step_credentials(self, user_input=None):
Expand Down
Loading