Adafruit IO Actions lets you define the logic for this project without programming.
If you get stuck during this page, we have a guide all about Adafruit IO Actions: https://learn.adafruit.com/how-to-use-blockly-for-actions-on-adafruit-io
Create a new Action
Navigate to the Adafruit IO Actions page. Click New Action.
Give your action a name and a description.
Click Create.
You should see the Actions workspace.
1. Set the Schedule
Every automation needs a trigger to tell it when to run.
-
Trigger: Choose Schedule.
-
Frequency: Set it to run Every Month, Every Day, and Every Hour.
-
Minute: Set it to At minute: 0. This ensures your display updates at the top of every hour.
2. Check the Forecast
To get the minimum temperature it will be overnight, we'll first need a variable to store it.
- Create a new variable: Name it overnight-temperature
- Variable Block: Add an Set Variable block for the variable you just created
Next, set the variable to the weather forecast metric you want (overnight temperature).
-
Weather Metrics: Select the Weather block.
-
Set the location (e.g., Brooklyn), the time to Today, and the metric to Overnight: Temperature Min.
-
3. Set the NeoPixel LEDs
Next, to check if it is going to freeze overnight and set the NeoPixel accordingly.
-
Add a conditional block.
-
Add a compare numbers block.
-
Conditional Block
-
If: Set the comparison to
<=- Add a Get Variable Block and set it to the
overnight-temperaturevariable.
- Add a Get Variable Block and set it to the
-
Do: If it is going to frost overnight, use the Set block to change your QT Py NeoPixel to a blue hex color code to indicate frost, like
#0047ff. -
Else: If it’s not going to frost overnight, set the NeoPixel to
#000000(off). The light will only turn on when it's going to frost overnight.
-
4. Text Me!
With Adafruit IO+, you can receive text messages for alerts. It's easy to add this functionality into your action.
- Add a SMS Block.
- Set the message to something like:
-
🌱 ❄️ Frost Risk Alert!Expected overnight min. temperature of {{ vars.overnight-temperature }}°C- For more information about setting the variable in the text block - check out this page.
-
The run retrieves tonight's forecast (17.15 degrees Celsius) and shows the NeoPixel's color (#000000) in relation to the color code
Going forwards, the Action is enabled and will run at the top of every hour.
Page last edited April 17, 2026
Text editor powered by tinymce.