From 384feef0c4fc627e8bcff5d8f73522237846cc28 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 29 Jan 2025 13:17:46 -0800 Subject: [PATCH] Update to work with settings.toml --- adafruit_funhouse/network.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_funhouse/network.py b/adafruit_funhouse/network.py index 2bacf1c..a537ebf 100755 --- a/adafruit_funhouse/network.py +++ b/adafruit_funhouse/network.py @@ -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)