Set Up Adafruit IO Actions
Setting Up the Weather Power-Up
First we need to set up your location in the Adafruit IO Weather Power-Up (if you haven't done this already). Click on Power-Ups in the top navigation bar, then click on the Get Started button on the Weather Power-Up.
You can click and drag the map around, then click on the map to add the latitude and longitude to the Location field. Or you can use a tool like this to just type in a zip code to get the lat/lon coordinates (for those in the U.S.).
Give this location a name, then click Create.
Now let's create the action. In the top navigation bar, click Actions, then click New Action.
Then give this action a title, like Snow Tracker, and give it a good description (Check if it is snowing and how much it is going to snow today). Then click the Create button.
Create the Action
Creating an Adafruit IO Action is what makes this project smart without you having to touch a line of code. By using the Weather Power-Up, we can pull real-time data for your specific location and push it directly to your QT Py.
Here is how to build the Action logic for your snow tracker:
1. Set the Schedule
Every automation needs a trigger to tell it when to run.
-
Trigger Type: Choose Schedule.
-
Frequency: Set it to run Every Month, Every Day, and Every Hour.
-
Minute: Set it to At minute: 15. This ensures your display updates shortly after the top of every hour.
2. Check for Active Snowfall
Next, to create a conditional statement to see if it is currently snowing.
-
If block: Add an "if/do/else" block.
-
Weather Metric: Select the Weather block. Set the location (e.g., Minneapolis), the time to This hour, and the metric to Precipitation Type.
-
Condition: Set the comparison to
=and the text value to"snow". -
Do: If it is snowing, use the Set block to change your QT Py NeoPixel to a nice "winter blue" like
#0047ff. -
Else: If it’s not snowing, set the NeoPixel to
#000000(off) so the light only shines when there's action outside.
3. Calculate Daily Snowfall
Finally, to grab the forecast and show it on the 7-segment display.
-
Set variable: Create a variable named
Snow. -
Weather Forecast: Use another Weather block. Set it to Today and change the metric to Snowfall Amount.
-
Unit Conversion: The weather service provides data in millimeters. If you want inches, use a math block to multiply $(\times)$ that value by
0.0393700787. -
Update Display: Use a final Set block to send the value of your
Snowvariable directly to the 7-Segment LED Matrix.
Live Data
After you click Save & Run, your display should now update. In the example below, for Minneapolis, I'm not expected to get any snow today, and it isn't currently snowing.
So the display reads 0.0, and the NeoPixel on the QT Py is turned off.
Page last edited March 02, 2026
Text editor powered by tinymce.