Skip to content

Commit

Permalink
Update adafruit-io.py
Browse files Browse the repository at this point in the history
Re-order secrets fields and make errors a little nicer
  • Loading branch information
helgibbons authored May 8, 2024
1 parent 4632c3e commit 30ff0b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/adafruit-io.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
Press Ctrl+C to exit!
""")

# Set to your Adafruit IO username.
# (go to https://accounts.adafruit.com to find your username)
ADAFRUIT_IO_USERNAME = 'YOUR AIO USERNAME HERE'

# Set to your Adafruit IO key.
# Remember, your key is a secret,
# so make sure not to publish it when you publish this code!
ADAFRUIT_IO_KEY = 'YOUR AIO KEY HERE'

# Set to your Adafruit IO username.
# (go to https://accounts.adafruit.com to find your username)
ADAFRUIT_IO_USERNAME = 'YOUR AIO USERNAME HERE'

# We can compensate for the heat of the Pi and other environmental conditions using a simple offset.
# Change this number to adjust temperature compensation!
OFFSET = -7.5
Expand All @@ -39,7 +39,7 @@
aio.create_feed(Feed(name="Rain"))
print("Feeds created!")
except RequestError:
print("Feeds already exist!")
print("Feeds not created - perhaps they already exist?")

temperature_feed = aio.feeds('temperature')
humidity_feed = aio.feeds('relative-humidity')
Expand All @@ -54,7 +54,7 @@
dashboard = aio.create_dashboard(Dashboard(name="Weather Dashboard"))
print("Dashboard created!")
except RequestError:
print("Dashboard already exists!")
print("Dashboard not created - perhaps it already exists?")

dashboard = aio.dashboards('weather-dashboard')

Expand Down

0 comments on commit 30ff0b2

Please sign in to comment.