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

Handling empty strings in MQTT environment variables + not set attributes #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coconup
Copy link

@coconup coconup commented Feb 19, 2024

  • Accepting empty strings (e.g. MQTT_USER / MQTT_PASSWORD) as environment variables
  • Avoiding errors if mqtt_user is not set in user_config

@fl4p
Copy link
Owner

fl4p commented Dec 10, 2024

Skipping empty env values was intentionally.
It looks like you want to override user_config with empty env values?

I propose this change:

if env_value is not None or k not in user_config:

becomes:

if env_value is not None and k not in user_config:

The env value should not be used if it is None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants