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

Update to work with settings.toml #44

Merged
merged 1 commit into from
Jan 29, 2025
Merged
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
6 changes: 3 additions & 3 deletions adafruit_funhouse/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def __init__(
def init_io_mqtt(self) -> IO_MQTT:
"""Initialize MQTT for Adafruit IO"""
try:
aio_username = self._secrets["aio_username"]
aio_key = self._secrets["aio_key"]
aio_username = self._get_setting("AIO_USERNAME")
aio_key = self._get_setting("AIO_KEY")
except KeyError:
raise KeyError(
"Adafruit IO secrets are kept in secrets.py, please add them there!\n\n"
"Adafruit IO secrets are kept in settings.toml, please add them there!\n\n"
) from KeyError

return self.init_mqtt(IO_MQTT_BROKER, 8883, aio_username, aio_key, True)
Expand Down