I’m surprised that in the list of contracts allowing interfacing with energy tracking, TotalEnergies contracts are not listed. I can’t imagine being the only one subscribed to this provider.
It’s done The TotalEnergies integration is developed. It adds TotalEnergies contracts to Gladys’ energy tracking.
It will soon be available on the store (I hope tonight )
Next step to follow here: All Workflow Runs · GitHub
What it brings
TotalEnergies contracts in Gladys, which we choose when creating our energy contract:
Access, Heures Eco and Fixe 2 years (Base or HP/HC)
Charge’Heures (HP / HC / super off-peak hours from 2 a.m. to 6 a.m.)
Heures Eco+ (HP / HC / vigilance hours of Éclair days)
« Other offer » (Base or HP/HC), for Verte Fixe, Online, etc.
Prices are pre-filled with the October 1, 2026 grid (9 kVA, TTC). Just correct them with those from your bill, as well as your off-peak hours.
One device per contract, with the price of the kWh and the current period (HP, HC…), updated every minute.
Scenes:
Triggers: « tariff period change », « vigilance hours soon », « Éclair day announced ».
Actions: « read current tariff », « declare an Éclair day ».
Example: turn on the water heater when switching to off-peak hours.
Two widgets for the dashboard:
« TotalEnergies Tariff »: price, period, next change, 24-hour curve.
« Éclair Days »: number of days in the season out of 20, buttons to declare or cancel a day.
Interface and documentation in French, English, German and Spanish.
To use it
Install the TotalEnergies integration from the catalog.
Create your contract in the energy tracking by choosing the TotalEnergies model of your offer, with the prices from your bill.
Link it to your meter, as usual.
Add the contract device from the Discovery tab of the integration.
Good to know
You need Gladys 5.2 or higher.
No TotalEnergies account is required: everything is calculated locally, in the integration.
The integration does not retrieve consumption. For that, you still need your meter in Gladys (Linky via Enedis, teleinfo…). The integration provides the contract and the tariff.
Heures Eco+: TotalEnergies announces Éclair days only by email or SMS, and there is no API to read them. You have to declare them with a click, from the widget or a scene.
TotalEnergies prices change regularly. Remember to check those of your contract.
Your feedback interests me, especially to check that the prices and time slots correspond well to your offer. And don’t hesitate: that’s the purpose of the forum
I adapted my contract to TotalEnergies’ fixed green gas offer,
a simple contract. Still considered as an electricity meter but it doesn’t matter, it’s all kWh
These two points are managed by Gladys itself, not by the integration: it declares the contract (price per kWh and monthly subscription), and it’s Gladys that calculates the costs and displays the widget.
To help you, I need some information:
Your Gladys version.
Your gas meter: which integration reports it, and what value it publishes (an index in kWh, in m³, a consumption?).
The “Energy Consumption” widget: does it not appear in the list, does it stay empty, or does it display an error?
The subscription: where do you see that it is not counted (which screen, which period)? And is the “Monthly Subscription” field correctly filled in the contract?
A screenshot of the contract and the meter would also help.
Small clarification: I see on your screenshot that your contract is “TotalEnergies Access – Base”. For the price change, you therefore need to take the same model (and not “other offer – Base” as I had written).
I therefore use the GRAPHIC WIDGET for consumption on the one hand and for the price on the other. The price of the consumed Kwh is correctly applied excluding the subscription.
What I wanted to achieve is the WIDGET Energy Consumption view as for ENEDIS since the subscription price was specified… but in the list Select an energy consumption device
There is no mention of cost…
I also had the following exchange with Pierre-Gilles:
Thank you for the details, I found: the « Energy Consumption » widget only lists the « Cost (30 min) » features, and on an MQTT device they are not created automatically.
Open your device in Integrations > MQTT.
On the index feature (Energy category, in kWh), click on « Create Features » (Energy Monitoring block), then Save.
In Energy, restart the consumption calculation and then the costs to retrieve the history.
In the « Energy Consumption » widget, choose your meter’s cost and check « Show Subscription »: the €12.32/month is added to the graph.
If the button does not appear, it is because your MQTT publishes a daily consumption and not an index: tell me what your GAZPAR integration publishes and we will look into it.
Thank you for the screenshots, everything is clear:
- On your MQTT meter, the index displays « No state in history »: nothing is feeding it.
- Gladys calculates the consumption 30 minutes from the differences between two index values, then the cost = consumption × price per kWh. Without an index, there is no consumption, therefore no cost, and the widget remains empty.
- The « Energy Consumption » widget only lists the « 30-minute Cost ». The daily cost (« Daily Consumption (cost) » on your Gazpar device) does not appear there: it is precisely your feature request with Pierre-Gilles.
To have the widget right now, you need to feed the MQTT index with a scene:
1. Trigger: « Meter Index » of the Gazpar device changes value.
2. Action: « Send an MQTT message »
Topic: that of the index on the MQTT card, of the type
3. The first value serves as a starting point: the consumption appears from the next value (the next day).
Note:
- This only works if the Gazpar index is in kWh. If it is in m³ (cube icon), it should not be sent as is: Gladys would take it for kWh.
- GRDF sends a value per day: the whole day falls into a single 30-minute slot, at the time the data arrives (often J+1). The daily and monthly totals are correct; only the hourly detail does not make sense for gas. In Base, the price remains correct.
- The past history will not be retrieved: the scene only sends new values.
Can you tell me the unit of « Meter Index » on your Gazpar device?
The online documentation has been updated and indicates M3…
The proposed approach is interesting because I’m starting to better understand Gladys’ architecture…
Thank you, it is indeed in m³. You therefore need to convert to kWh before sending the value to the MQTT index:
kWh = m³ × conversion coefficient (the one on your bill, around 11).
This coefficient changes slightly each month (it depends on the quality of the gas). No need to record all of them:
take an average value from your bill (e.g. 11.2);
do not change it afterward. The scene multiplies the full index: if you go from 11.20 to 11.25 on an index of 5,000 m³, Gladys sees a jump of 250 kWh at once. With a fixed value, the difference remains small (1 to 2 %).
The scene becomes:
Trigger: The “Meter Index” of the Gazpar device changes value.
Action “Set a Variable”, mode Calculated: {{triggerEvent.last_value}} * 11.2
(put your coefficient, with a dot and not a comma)
Action “Send an MQTT Message”:
Topic: the same as in my previous message;
Message: type {{ and choose the variable from step 2.
The rest does not change: the first value serves as a starting point, the consumption appears the next day, and the past history is not taken into account.
And yes, by following this path, you can see how Gladys works: an index → consumption per 30 minutes → a cost → the widget
Yes, that’s normal: without any consumption, there’s nothing to display. But you can prepare everything right now:
Set up the scene now. It will then run on its own, without any action required.
To check that it works, no need to wait for winter. After the next GRDF reading (often the next day), the MQTT index card should no longer display “No status in history”.
The frost protection consumes a little. Even if it’s minimal, this consumption will appear the very next day, along with its cost.
No need to restart the recalculation. Gladys calculates the new days on its own. A recalculation wouldn’t go back before the first value sent by the scene, as Gladys has no index before that.
I was about to do it, but if, after making the changes, I reload the application for reason x or y, would I lose them?
If so, how do I save and restore the device? In other words, how do I keep the modified device?
Of course, with Gladys+ you can save…
By the way, it’s like local contracts, you can export them, I looked at the .csv file, but what to do with it? I thought we could import them before?
You won’t lose anything. As soon as you click Save, everything is written in Gladys’ database, on the disk, not in the browser. This applies to the MQTT device, its features, the scene, and the contract.
Reloading the page, restarting Gladys, updating Gladys: nothing changes.
Updating the TotalEnergies integration does not affect your MQTT device or the contract. The contract is managed by Gladys, not by the integration.
You only lose something if you delete the device yourself, or if the disk (or SD card) fails.
Backup without Gladys Plus. All the configuration is in the /var/lib/gladysassistant folder on the machine. For a clean copy, stop Gladys while copying the folder:
docker stop gladys
sudo cp -a /var/lib/gladysassistant /backup/path/gladysassistant-$(date +%F)
docker start gladys
To restore: you stop Gladys, put the folder back in place, then restart Gladys. The best is to keep the copy on another disk or a NAS.
The CSV of contracts. This is a copy of your prices, readable in a spreadsheet. To back up, you don’t need it: the contracts are already in the database, so in the backup above. The import you have in mind was, I think, the automatic import of official price histories (the energy-contracts repository), not a manually made CSV. I’m not sure if a CSV import still exists in 5.3: @pierre-gilles can confirm.