CFE (tarifas domésticas) smart home integration, free and open source

CFE tiered domestic tariffs by region and season, with automatic DAC switch.
CFE domestic tariffs, tiered by region and season, with an automatic switch to the DAC tariff based on the 12-month rolling average. Everything is computed locally (Mexico only).
Installation
- In Gladys, open Integrations, then the external integrations store.
- Search for CFE (tarifas domésticas) and click Install.
- Wait for the container to start: the integration shows up in the list.
Configuration
Open the Configuration tab and pick your tariff (1, 1A to 1F: the letter on your CFE bill). Check the four prices in MXN per kWh (basic, intermediate, excess, DAC): CFE updates them every month, so adjust them when needed. The prices exclude fixed charges and taxes. Keep Switch to DAC automatically on to follow the DAC rule.
Usage
Delegated energy contract. In the Gladys energy settings, create a contract from the template CFE domestic tariff (tiers and DAC). Gladys sends the consumption and this integration prices it: basic, intermediate and excess tiers of the month, then DAC when the average of the last 12 months exceeds the limit of the tariff. Optionally enter the average monthly kWh of your last bill (input avg_12m_kwh) to apply DAC from day one, until 12 months of history exist.
Tariff device. A read-only device CFE tariff gives the price per kWh in force and the current tier.
Scenes and dashboards
- Triggers: Tariff tier changed (variables: tier, previous tier, price, tariff, season) and DAC status changed (variables: active, 12-month average).
- Actions: Read the current tariff (outputs: tariff, tier, price, dac, month kWh) and Recalculate the costs.
- Widget CFE tariff: price, tier, month consumption, 12-month average and a Recalculate button.
Limits
The tier limits are indicative and the prices are yours to maintain; check them against the CFE site. Tiers are computed per calendar month (CFE bills every two months). The consumption history is kept in the integration's /data volume, so the 12-month average needs a year of data or the optional input above.
Help
A question or a problem? Ask on the Gladys community forum or open an issue on the GitHub repository.
Configuration settings
These are the settings CFE (tarifas domésticas) asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Getting started | section | No | Pick your CFE tariff (the letter printed on your bill) and check the prices: the integration computes everything locally, no account needed. |
| Tariff | select | Yes | Domestic tariff of your region: 1 (temperate) to 1F (very hot). |
| Switch to DAC automatically | boolean | No | Apply the DAC tariff when the average of the last 12 months exceeds the limit of your tariff. |
| Basic tier price | number | No | Price in MXN per kWh, excluding fixed charges and taxes. CFE updates it monthly. |
| Intermediate tier price | number | No | Price in MXN per kWh, excluding fixed charges and taxes. CFE updates it monthly. |
| Excess tier price | number | No | Price in MXN per kWh, excluding fixed charges and taxes. CFE updates it monthly. |
| DAC price | number | No | Price in MXN per kWh, excluding fixed charges and taxes. CFE updates it monthly. |
| Refresh interval (s) | number | No | How often the tariff device is refreshed, in seconds (one minute minimum). |
How to install CFE (tarifas domésticas) in Gladys
- In Gladys, open Integrations: CFE (tarifas domésticas) appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/gboulvin/gladys-cfe-tarifas-domesticas:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/gboulvin/gladys-cfe-tarifas-domesticas.
CFE (tarifas domésticas) requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
CFE (tarifas domésticas) is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by gboulvin, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation