Add new Alpiq energy contract to contracts in Gladys

I have a quick question, I’m looking into switching my tempo contract from EDF to Primeo (nothing certain at the moment) :slight_smile:
Will this still work if we import a csv here: GitHub - GladysAssistant/energy-contracts: Gladys Assistant Energy Contracts as JSON ?

If the csv doesn’t exist, is there a way to integrate the rates? Manually, for example?
I found a Pdf here

Hi! Yes it will be possible to manually integrate the rates by manually copying the prices into a CSV or a JSON that we’ll put on the repo :slight_smile:

After that it will be more complicated to update because you’ll need to do some monitoring when prices change, and manually update the repo, but it’s possible!

Still, the simplest option is EDF, where there is open data :grinning_face_with_smiling_eyes:

1 Like

Thank you for the reply.

I finally opted for these rates from Alpiq:

How should I proceed to add them? :slight_smile:
Thanks

Thanks @prohand :slight_smile:

I would need either a JSON or a CSV in the format:

Example base rate:

 [{
 "contract": "base",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2012-07-23",
 "end_date": "2013-07-31",
 "price": 1256,
 "hour_slots": null,
 "day_type": null
}]

Example peak/off-peak hours:

[{
 "contract": "peak-off-peak",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2012-07-23",
 "end_date": "2013-07-31",
 "price": 964,
 "hour_slots": "TO_REPLACE_OFF_PEAK",
 "day_type": null
},
{
 "contract": "peak-off-peak",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2012-07-23",
 "end_date": "2013-07-31",
 "price": 1391,
 "hour_slots": "TO_REPLACE_PEAK",
 "day_type": null
}]

The price should be divided by one thousand — this is to store four decimal places as an integer.

What I can suggest is that I’ll make the initial PR, and then you can modify the file on the repo and make PRs yourself (no skills required, it’s just clicking in the browser).

Yes, no problem :slight_smile:

Thanks

1 Like

Sorry I just reread my message which isn’t very clear :smiley:

I’m fine with you sending me the JSON or the CSV, and I’ll take care of the first PR.

Then you can make the next PRs yourself :wink:

Oh, an Alsatian :heart: So, same problem for us here…

1 Like

Nope not Alsatian sorry :sweat_smile:

@pierre-gilles here is what I could do, I didn’t know what to put in hour_slots, I hope that’ll be okay

Base :

[{
 "contract": "base",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2025-11-04",
 "end_date": "2027-11-30",
 "price": 1609,
 "hour_slots": null,
 "day_type": null
}]

Off-peak/peak hours :

[{
 "contract": "peak-off-peak",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2025-11-04",
 "end_date": "2027-11-30",
 "price": 1361,
 "hour_slots": "TO_REPLACE_OFF_PEAK",
 "day_type": null
},
{
 "contract": "peak-off-peak",
 "price_type": "consumption",
 "currency": "euro",
 "start_date": "2025-11-04",
 "end_date": "2027-11-30",
 "price": 1710,
 "hour_slots": "TO_REPLACE_PEAK",
 "day_type": null
}]

[quote=« prohand, post:8, topic:9811 »]
@pierre-gilles here is what I was able to do,

I have no idea ^^

I took the basic plan
How can I check it? :slight_smile:

Time slots must be specified in your contract, and they may be different for other people (for example, in another region).

I haven’t received the contract yet because it’s being validated, but I think I’ll get it in the next few days

However, on their website it says the following:

In order to regulate electricity consumption and avoid excessively high consumption peaks, the electricity network operator Enedis has defined specific time slots:

  • Off-peak hours(8 hours per day): during which electricity consumption is at its lowest (mainly at night);
  • Peak hours (16 hours per day): during which electricity is more widely consumed.

Off-peak time slots are set by Enedis and vary according to local constraints and electricity production.

Since November 1, 2025, the new reform provides for a distribution of off-peak hours into 2 periods: a minimum of 5 guaranteed hours at night and 3 hours during the day.

The time slots can vary in summer and winter to adapt to energy production (notably solar) which is abundant in summer and to consumption peaks in winter.

I suppose it must be like the Tempo tariff.

No, it’s a bit more complicated than for a Tempo.
You will have 2 time slots for your off-peak hours (HC) in winter and (from what I’ve read) 1 or 2 in summer which will probably differ from winter. Beware of the summer/winter periods, it won’t be 6 months/6 months.
And the same goes for the peak hours (HP).
Only the HC/HP subscription is changing as of 1/11/25; for Tempo it remains identical and national: HC from 22:00 to 6:00, HP from

Ok thanks :slight_smile:

I asked the AI:
The peak/off-peak time slots are not the same for everyone at Alpiq (as with most suppliers in France).

I’ll check my contract when I can access it on Alpiq’s website on 11/19 normally :slight_smile: and I’ll update the JSON :slight_smile: .
But anyway, for me it won’t change anything — I’m on the base rate.

Ok, in that case you should not modify the JSON!

Leave it as is, and Gladys will offer to fill in the schedules at import time.

Ah ok, great then :slight_smile:
I’ll let you make the first push to the repo then :smiley:

@prohand I made a PR:

I generate the 34 available power levels automatically using the rate you gave me.

We’ll also need to handle the subscription price eventually!

Thanks :)\n\nDo you have any idea how that will be handled for the subscription price?

Yes, for each power level I will need:

 [{ 
 "contract": "base",
 "price_type": "subscription",
 "currency": "euro",
 "start_date": "2012-07-23",
 "end_date": "2013-07-31",
 "price": 1256,
}]

That would give a file like:

{
    "3":  [{
     "contract": "base",
     "price_type": "subscription",
     "currency": "euro",
     "start_date": "2012-07-23",
     "end_date": "2013-07-31",
     "price": 1256,
    }]
}

The « price » is monthly including all taxes (TTC)!

If you want to do it, using an AI might be smart — it’s no fun to copy all this by hand :stuck_out_tongue:

Here it is:

{
    "3": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 102
        }
    ],
    "4": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 112
        }
    ],
    "5": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 122
        }
    ],
    "6": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 132
        }
    ],
    "7": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 143
        }
    ],
    "8": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 154
        }
    ],
    "9": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 165
        }
    ],
    "10": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 176
        }
    ],
    "11": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 187
        }
    ],
    "12": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 198
        }
    ],
    "13": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 208
        }
    ],
    "14": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 218
        }
    ],
    "15": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 228
        }
    ],
    "16": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 238
        }
    ],
    "17": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 249
        }
    ],
    "18": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 259
        }
    ],
    "19": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 270
        }
    ],
    "20": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 281
        }
    ],
    "21": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 292
        }
    ],
    "22": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 303
        }
    ],
    "23": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 315
        }
    ],
    "24": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 326
        }
    ],
    "25": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 336
        }
    ],
    "26": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 347
        }
    ],
    "27": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 357
        }
    ],
    "28": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 368
        }
    ],
    "29": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 378
        }
    ],
    "30": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 389
        }
    ],
    "31": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 400
        }
    ],
    "32": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 411
        }
    ],
    "33": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 422
        }
    ],
    "34": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 432
        }
    ],
    "35": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 443
        }
    ],
    "36": [
        {
            "contract": "base",
            "price_type": "subscription",
            "currency": "euro",
            "start_date": "2025-11-04",
            "end_date": "2027-11-30",
            "price": 454
        }
    ]
}