
Updated in August 2026. Datadis and eData can bring the official electricity readings recorded by a Spanish distribution company into Home Assistant. This guide explains what each service does, how to install the correct integration, and how to avoid the most common mistakes.
Spain-specific guide: this procedure only works with electricity supply points located in Spain. Datadis obtains readings from Spanish distribution companies and requires a Spanish CUPS. This English version is intended for English-speaking residents and property owners in Spain. If your electricity supply is in the United States, read our guide to importing US utility energy data into Home Assistant.
The key distinction: Datadis is the platform that provides official readings. eData is the Home Assistant custom integration that downloads those readings. They are not two separate Home Assistant integrations.
What Datadis and eData are
Datadis centralizes metering information supplied by Spanish electricity distributors. A validated account can provide hourly consumption, exported energy, and maximum-demand readings when they are available for the selected supply point.
eData is an open-source custom integration for Home Assistant. It signs in with a Datadis account, imports the available information, and creates sensors, long-term statistics, and dashboard cards.
| Component | Purpose |
|---|---|
| Datadis | Source of official distributor readings |
| eData | Integration that imports those readings into Home Assistant |
| Energy dashboard | Displays the long-term statistics created by eData |
| Local energy meter | Optional device for immediate household measurements |
Important limitation: this is not real-time data
Datadis readings originate from the electricity distributor and arrive with a delay. The latest complete day commonly appears two or more days later, although the exact delay depends on the distributor and API availability.
A date displayed on the Datadis website may not yet be available through its private API. eData can therefore receive a reading later than the website. It should not be used as a real-time power meter.
Requirements
- A working, validated Datadis account.
- Access to the relevant Spanish electricity supply point.
- A recent Home Assistant installation.
- HACS.
- The Recorder and Lovelace components, enabled by default in Home Assistant.
You do not need to enable the public API option when registering at Datadis. eData uses the private API associated with the account.
How to create a Datadis account step by step
If you do not yet have an account, complete this process before installing eData. Prepare an email account you can access, your mobile phone, the account holder’s NIF/NIE/CIF, and a recent electricity bill showing the CUPS.
1. Open the official registration page
- Open the official Datadis registration page.
- Select Register or Register now.
- Choose the appropriate user profile. A normal household will usually use Individuals and self-employed.
Button labels may change slightly. Make sure that you remain within the datadis.es domain throughout the process.
2. Enter the account holder’s details
Provide the requested personal details: full name, NIF/NIE/CIF, email address, and telephone number. They must match the information held by the electricity distributor for the contract owner.
- Do not use the retailer’s details or a contract number as personal identification.
- The retailer issues the bill; the distributor operates the meter and provides its readings.
- The CUPS normally begins with
ESand is printed on electricity bills.
3. Create a password and accept the terms
Create a unique Datadis password, accept the required legal terms, and submit the form. Keep the email address and password: these are the credentials that will later be entered in eData.
Do not enable the public API for eData. The integration uses the private API available to a normal Datadis account. A setting intended for public API access is not required for this guide.
4. Confirm the email address or SMS
Datadis must verify your contact details. Open the message you receive and follow its confirmation link. Depending on the process shown, you may instead be asked to enter a code sent to your mobile phone by SMS.
- Check spam, junk, and promotions folders.
- Confirm that the telephone number and country prefix are correct.
- Never share the verification link or code.
5. Sign in and find the supply point
After validation, sign in to Datadis. The platform queries contracts associated with your identification and should display the supply points for which you are the registered owner. If several homes or premises are listed, use the address and CUPS to identify each one.
You do not need to enter a CUPS manually for eData to discover a contract already linked to the account. During configuration, eData displays the supply points returned by Datadis so you can select the correct one.
6. Confirm that Datadis already provides readings
- Select the supply point.
- Open its consumption section.
- Confirm that daily, hourly, or monthly readings are shown.
- Note which CUPS belongs to the home you will integrate.
This check is essential: if Datadis does not yet display the supply point or its consumption, eData cannot download it either. Get the official website working first, and only then continue with Home Assistant.
What if my supply point does not appear?
- Check that the NIF/NIE/CIF exactly matches the contract owner shown on the bill.
- Confirm that the contract is not registered to another person, company, relative, or former property owner.
- Check the CUPS and distributor on a recent bill.
- Sign out and try again later in case the association is still being processed.
- If it remains missing, consult the Datadis Help Center or ask the distributor to correct the account-holder details.
If you are not the contract owner
Datadis allows the owner to authorize a third party. That authorization must already exist in Datadis before eData is configured. The authorized NIF field in eData is only used in this situation; leave it empty when signing in with the actual owner’s account.
Installing eData through HACS
1. Add the custom repository
- Open HACS → Integrations.
- Open the three-dot menu and select Custom repositories.
- Add
https://github.com/uvejota/homeassistant-edata. - Select Integration as the category.
- Find and install eData.
2. Restart Home Assistant
Restart Home Assistant from Settings → System after installing the component. Reloading the browser alone does not load the integration code.
3. Add the integration
- Open Settings → Devices & services.
- Select Add integration.
- Search for eData.
- Enter the Datadis username and password.
- Select the supply point to import.
- Only provide an authorized NIF when the account holder is not the owner of that supply point.
Credentials are kept in Home Assistant’s internal storage. They do not need to be placed in configuration.yaml or exposed in an automation.
The first synchronization can take time
On its first run, eData attempts to recover the available history. Datadis can respond slowly and limit requests, so some entities may initially show Unknown or Unavailable.
Avoid deleting and reinstalling the integration repeatedly. If the credentials and selected supply point are correct, allow the initial import to finish. eData will subsequently request only missing data.
Sensors and statistics created by eData
The main device normally has an entity similar to sensor.edata_xxxx, where xxxx represents the final characters of the supply identifier. Secondary entity IDs depend on the Home Assistant language and entity registry, so confirm them under Developer tools → States.
- Latest registered daily consumption and represented date.
- Yesterday’s consumption when the distributor has published every hour.
- Current-month and previous-month consumption.
- P1, P2, and P3 tariff-period breakdowns.
- Maximum registered power or maximum demand.
- Exported energy when generation data is available.
- Estimated costs when compatible tariff calculation is configured.
eData also stores long-term statistics. These make historical reporting possible without relying only on an entity’s current state.
Adding eData to the Energy dashboard
- Open Settings → Dashboards → Energy.
- Under grid consumption, select Add consumption.
- Choose the consumption statistic created by eData.
- Save and allow Home Assistant time to process the statistics.
The primary statistic is normally identified internally as edata:xxxx_consumption. Separate statistics can also be available for P1, P2, P3, exported energy, maximum demand, and cost.
Native card and advanced charts
eData automatically registers its own edata-card. This is the easiest way to display consumption, summaries, exported energy, and maximum demand. ApexCharts can be used when a more customized layout is required.
Current, tested configurations are available in our eData and Datadis charts for Home Assistant guide.
Import and reset actions
The eData device page can provide two actions:
- Import all available data: requests all historical information currently allowed by Datadis.
- Reset: requests recent readings again and rebuilds statistics when gaps, duplicates, or inconsistencies are detected.
Do not use Reset as routine maintenance. It is a repair tool and may recalculate past periods using the current tariff configuration.
Troubleshooting
Yesterday’s data is missing
This is not necessarily a fault. The distributor may not have published the complete day, or the Datadis API may make it available later than the website. Wait for the next synchronization.
Datadis shows a reading but eData does not
The website and private API do not always update together. eData can only import what the API returns and cannot reconstruct hours that are still missing.
Entities remain Unknown
- Sign in directly at Datadis to confirm that the account works.
- Check that the correct supply point belongs to the account.
- Search for
edataunder Settings → System → Logs. - Check the eData issue tracker for a current service problem.
The electricity retailer has changed
Contract changes can produce temporary gaps or months that the API does not return correctly. The retailer issues the bill, while the distributor provides meter readings; these are different roles.
Does Datadis or eData work outside Spain?
Not directly. Datadis connects to participating Spanish electricity distributors and identifies supply points by their Spanish CUPS. A home in the United States, the United Kingdom, or another country needs an integration supported by its local utility, distributor, or energy-data provider. The Home Assistant Energy dashboard can still be used worldwide, but the entity supplying its official readings will be different.
Conclusion
eData is the practical way to bring official Datadis readings into Home Assistant. It does not replace a real-time local meter, but it is valuable for retaining official consumption, checking maximum demand, populating the Energy dashboard, and comparing other measuring devices.
Continue with the eData and Datadis chart guide, or consult the eData project documentation.

