Home Assistant custom integration for monitoring Edesur Argentina electricity supplies. Track your account status, debt, outages, and service cuts directly from Home Assistant.
- Multi-Supply Support: Monitor multiple electricity supplies from a single account
- Reconfigurable Supply Selection: Add or remove supplies after initial setup
- Account Monitoring: Track account status, debt, and payment due dates
- Outage Detection: Real-time monitoring of service cuts and outages
- Global Outage Information: View current and scheduled outages across the network
- Automatic Reauthentication: Seamlessly handles token expiration
- Configurable Update Intervals: Customize polling frequency for supplies and outages
- Multi-Language Support: Available in English and Spanish
- Robust Error Handling: Automatic retries and graceful degradation
Each electricity supply creates a device named "Edesur Argentina [account_number]" with the following sensors:
-
Customer Name (
sensor.edesur_argentina_[supply_id]_customer_name)- State: Customer name from account
- Icon: mdi:account
-
Account Status (
sensor.edesur_argentina_[supply_id]_account_status)- State: Account status (Active, Suspended, etc.)
- Attributes: Balance, last payment, last payment date
- Icon: mdi:account-check
-
Total Debt (
sensor.edesur_argentina_[supply_id]_total_debt)- State: Total debt amount in USD ($)
- Device Class: Monetary
- Attributes: Detailed breakdown of individual debts
- Icon: mdi:currency-usd
-
Due Date (
sensor.edesur_argentina_[supply_id]_due_date)- State: Next payment due date
- Device Class: Date
- Attributes: Supply and customer information
- Icon: mdi:calendar-clock
-
Last Outage (
sensor.edesur_argentina_[supply_id]_last_outage)- State: Last outage information
- Attributes: Outage start, end, and reason
- Icon: mdi:power-plug-off
-
Service Status (
binary_sensor.edesur_argentina_[supply_id]_service_cut)- State: On if service is cut, Off otherwise
- Device Class: Problem
- Attributes: Cut type, reason, estimated restoration time
- Icon: mdi:power-plug-off
-
Supply Status (
binary_sensor.edesur_argentina_[supply_id]_outage_affecting_supply)- State: On if an outage is affecting this supply
- Device Class: Problem
- Attributes: Outage details, affected area, outage type
- Icon: mdi:transmission-tower-export
- Edesur Current Outages (
sensor.edesur_argentina_global_current_outages)- State: Number of current outages
- Attributes: List of affected areas
- Icon: mdi:power-plug-off-outline
- Ensure HACS is installed
- Add this repository as a custom repository in HACS:
- Open HACS
- Go to "Integrations"
- Click the three dots in the top right
- Select "Custom repositories"
- Add URL:
https://github.com/catastrophicode/ha-ar-edesur-integration - Category: Integration
- Click "Install"
- Restart Home Assistant
- Download the latest release from GitHub
- Extract the
custom_components/edesur_argentinadirectory to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
- Navigate to Settings → Devices & Services
- Click + Add Integration
- Search for "Edesur Argentina"
- Enter your Edesur Oficina Virtual credentials
- Select which supplies you want to monitor
- Click Submit to complete setup
You can add or remove supplies after initial setup:
- Go to Settings → Devices & Services
- Find the Edesur Argentina integration
- Click the three dots menu (⋮)
- Select Reconfigure
- Update your supply selection
- Click Submit - the integration will reload with your new selection
After setup, you can configure polling intervals:
- Scan Interval: How often to update supply data (default: 30 minutes)
- Outage Scan Interval: How often to check for outages (default: 5 minutes)
To configure options:
- Go to Settings → Devices & Services
- Find the Edesur Argentina integration
- Click Configure
POST /api/Usuario/LoginAsync- AuthenticationPOST /api/Usuario/GetProfileAsync- User profile (includes DNI)POST /api/Cliente/SupplyRetrieveAsync- Retrieve suppliesGET /api/Cliente/ResumenCuentaAsync/{supplyId}- Account summaryPOST /api/PlanPagos/GetDeudaAsync- Debt informationPOST /api/utils/outage-by-client- Outage statusGET /api/Cliente/ValidarCorteSuministroAsync/{supplyId}- Service cut validation
GET https://www.enre.gov.ar/paginacorte/js/data_EDS.js- Current outages
This integration handles authentication with Edesur's API using their required encryption method. Your credentials are stored securely in Home Assistant's configuration and are never exposed in logs or the UI.
Recommendation: Use a strong, unique password for your Edesur account.
Problem: "Authentication failed" error during setup
Solutions:
- Verify your email and password are correct
- Check that you can log in to Oficina Virtual
- Ensure your account is active
- Check Home Assistant logs for detailed error messages
Problem: "No supplies found" error
Solutions:
- Ensure your account has registered supplies
- Verify you can see your supplies in the Oficina Virtual web portal
- Check Home Assistant logs for detailed error messages
Problem: "Cannot connect" errors
Solutions:
- Check your internet connection
- Verify Home Assistant can reach ed.edesur.com.ar
- Check if Edesur's API is down (temporary outages)
- Review Home Assistant logs for detailed error messages
Problem: Sensors show stale data
Solutions:
- Check the update interval in integration options
- Review logs for API errors
- Verify your authentication token hasn't expired
- Restart the integration
Add to configuration.yaml:
logger:
default: info
logs:
custom_components.edesur_argentina: debugThen restart Home Assistant and check the logs at Settings → System → Logs.
- Rate Limiting: Edesur may rate-limit API requests. Default intervals are conservative to avoid issues.
- Authentication Token Expiry: Tokens expire after a period. The integration handles reauthentication automatically.
- Data Freshness: Account and debt data may not be real-time; it reflects Edesur's internal systems.
- Outage Information: Global outage data depends on third-party sources (ENRE) and may have delays.
custom_components/edesur_argentina/
├── __init__.py # Integration setup and entry points
├── manifest.json # Integration metadata
├── const.py # Constants and configuration
├── config_flow.py # UI configuration flow
├── edesur_encryption.py # Encryption implementation
├── encryption.py # Encryption utilities
├── api_client.py # Edesur API client
├── coordinator.py # Data update coordinators
├── sensor.py # Sensor platform
├── binary_sensor.py # Binary sensor platform
└── translations/ # UI translations
├── en.json # English translations
└── es.json # Spanish translations
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial integration and is not affiliated with, endorsed by, or connected to Edesur or any of its subsidiaries or affiliates. This integration is provided "as is" without warranty of any kind.
Use at your own risk. The authors are not responsible for any issues arising from the use of this integration, including but not limited to service disruptions, data inaccuracies, or account access issues.
- Home Assistant community for documentation and examples
- Edesur Argentina for providing the Oficina Virtual service
- ENRE (Ente Nacional Regulador de la Electricidad) for public outage data
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Home Assistant Community: Community Forum
- ✅ Reconfigure flow to add/remove supplies after initial setup
- ✅ Spanish translations for UI elements
- ✅ Pre-populated supply selection during reconfiguration
- ✅ Fixed encryptor attribute inconsistency in API client
- ✅ Automatic token refresh on 401 authentication errors
- ✅ Fixed reauthentication loop prevention for login endpoint
- ✅ Preserve sensor data during transient errors (prevents graph gaps)
- ✅ Removed unreliable scheduled outages endpoint
- ✅ Increased timeout for slow outage endpoints (60s)
- ✅ Multi-supply monitoring
- ✅ Customer name sensor
- ✅ Account status and debt tracking
- ✅ Outage detection (per-supply and global)
- ✅ Service cut monitoring
- ✅ Configurable update intervals
- ✅ Automatic reauthentication
- ✅ Comprehensive error handling and retry logic
- ✅ Async-first architecture with non-blocking setup
- ✅ Graceful handling of timeouts and cancellations