[Tutorial] Get notified 2 days before a Tempo red day (forecast + days remaining, no API key)

Hello everyone,

I’m Jean-Pierre and I’m part of the Tempo Calendar team, a website that publishes the Tempo color of the day, forecasts up to 15 days in advance, and a free JSON API. I’m saying this upfront so it’s clear: it’s our API that I’m using in this tutorial.

Why this tutorial?

For today and tomorrow, Gladys already handles Tempo very well with the native integration (widget and « Condition on EDF-Tempo » action). Keep it, it does the job.

What’s missing is looking further than tomorrow. The official color is only published the day before at around 11 a.m., leaving little time to organize (laundry, water heater, car charging, preheating…). The idea here is:

  • receive a message when a red day is likely in 2 days;
  • receive every Monday the number of remaining red and white days in the season.

All of this with the « Make an HTTP request » action, without Node-RED, without MQTT, and without an API key.

Prerequisites

  • Gladys 5 (the actions used exist in 5.1).
  • A messaging service configured (Telegram, ntfy…) if you want to receive messages elsewhere than in the Gladys conversation.
  • That’s it: the request goes from the Gladys server, there’s nothing to install.

A quick reminder about how scenes work: the actions of the same block are executed in parallel. So put each action in a new block, one below the other, so that the request is completed before the condition.


Scene 1: « Red day likely in 2 days » alert

1. Create the scene, for example « Tempo: J+2 alert ».

2. Trigger: « Scheduled trigger », Every day, 18:00.

3. Block 1: « Make an HTTP request » action

  • Method: GET
  • URL: https://www.calendrier-tempo.fr/api/predictions
  • No headers

Click on « Try ». The response is displayed and Gladys automatically creates the variables from the JSON. This step is essential to be able to choose the variables later.

The response looks like this (excerpt):

{
  "status": "ok",
  "predictions": [
    { "date": "2026-10-07", "couleur_predite": "BLUE", "probabilite_rouge": 0.0, "horizon": "J0", "confirmed": true },
    { "date": "2026-10-08", "couleur_predite": "BLUE", "probabilite_rouge": 0.0, "horizon": "J-1", "confirmed": true },
    { "date": "2026-10-09", "couleur_predite": "BLUE", "probabilite_bleu": 0.987, "probabilite_blanc": 0.013, "probabilite_rouge": 0.0, "horizon": "J-2", "confirmed": false }
  ]
}

The list starts today: [0] = today, [1] = tomorrow, [2] = the day after tomorrow, and so on up to J+15. Probabilities range from 0 to 1. When the official color is known, confirmed changes to true.

4. Block 2: « Condition on variables » action

  • Variable: data.predictions.[2].probabilite_rouge
  • Operator: greater than or equal to
  • Value: 0.5

With a lower value (0.3 for example), you will be notified more often, with more false alerts. It’s up to you to adjust.

5. Block 3 (optional): « Set a variable » action

To display a readable percentage instead of 0.62:

  • Name: risk
  • Type: Calculated
  • Value: round( + the variable data.predictions.[2].probabilite_rouge (type {{ to choose it) + * 100)

6. Block 4: « Send a message » action

Type {{ to insert variables. For example:

:red_circle: Tempo: likely red day on [data.predictions.[2].date] (risk [risk] %). Good time to move laundry and water heater forward.

To test right away (in October, everything is blue): temporarily replace probabilite_rouge with probabilite_bleu in the condition, run the scene manually, check the message, then put back probabilite_rouge.

Variants:

  • Monitor J+2 to J+4 at once: in the same « Condition on variables » block, add conditions with « + OR » on [3] and [4]. Then adapt the message text (« in the coming days »), as it only displays one date.
  • Be notified of white days: same principle with probabilite_blanc.

Scene 2: The day before and on the day, the native integration is sufficient

Once the official color is published, use Gladys’ « Condition on EDF-Tempo » (Tomorrow, Red day) followed by, for example, « Turn off outlets » for a space heater or water heater. The official Gladys documentation explains this very well, I won’t copy it.


Scene 3: The remaining days stock every Monday

1. Trigger: « Scheduled trigger », Every week, Monday, 08:00.

2. Block 1: « Make an HTTP request », GET on https://www.calendrier-tempo.fr/api/remaining, then « Try ».

{
  "status": "ok",
  "remaining": { "ROUGE": 22, "BLANC": 43, "BLEU": 262 },
  "totals": { "ROUGE": 22, "BLANC": 43, "BLEU": 300 },
  "season_start": "2026-09-01",
  "season_end": "2027-08-31"
}

3. Block 2: « Send a message », for example:

Tempo: there are [data.remaining.ROUGE] red days and [data.remaining.BLANC] white days left this season.


Good to know

  • These are forecasts: only the color published by EDF is official. The further the deadline, the greater the uncertainty, which is why I use probability rather than a dry color.
  • The responses are cached for 2 minutes on our side: one or two requests per day are more than enough.
  • The official colors that we relay (/api/today, /api/tomorrow) come from api-couleur-tempo.fr. The forecasts and the countdown of days are calculated on our side.
  • Free, no registration or key. All fields are described here: Tempo API documentation
  • Red days can only fall between November 1st and March 31st: it’s the right time to set up the scene.

If you test and something doesn’t work, let me know here, I’ll correct the tutorial. And if a field is missing for Gladys, I’m interested.

Jean-Pierre, from the Tempo Calendar team