A custom Home Assistant integration that fetches electricity usage data from ESB Networks (Ireland) and imports it as long-term statistics with full historical data.
- 🔌 Automatic data import - Fetches your smart meter readings from ESB Networks
- 📊 Full historical data - Imports all available historical readings (typically 2+ years)
- ⏱️ Hourly statistics - Aggregates half-hourly readings into hourly statistics
- 📈 Energy Dashboard compatible - Works seamlessly with Home Assistant's Energy Dashboard
- 🔄 Daily updates - Automatically fetches new data once per day
- 💾 Development cache mode - Cache data during development to avoid ESB rate limits
- Home Assistant instance
- ESB Networks account with linked smart meter (Create account here)
- Your electricity meter MPRN (Meter Point Reference Number)
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots menu (top right) and select "Custom repositories"
- Add this repository URL and select category "Integration"
- Click "Install"
- Restart Home Assistant
- Copy the
custom_components/esb_integrationfolder to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration
- Search for "ESB Integration"
- Enter your credentials:
- MPRN: Your electricity meter number
- Email: Your ESB Networks account email
- Password: Your ESB Networks account password
The integration will immediately fetch your historical data. This may take 30-60 seconds for the initial import.
- Go to Settings → Dashboards → Energy
- Click Add Consumption
- Under "Statistics", select ESB Energy [YOUR_MPRN]
- Save
- Add a new card to your dashboard
- Select Statistics Graph
- Choose the statistic: ESB Energy [YOUR_MPRN]
- Configure time period (hour/day/week/month/year)
- The integration updates once every 24 hours by default
- Manual updates count toward this limit
- Exceeding the limit triggers human verification (captcha)
- Limits reset at midnight Irish time (UTC)
- If blocked, wait until midnight to try again
- ESB provides half-hourly readings (00:00, 00:30, 01:00, 01:30, etc.)
- The integration aggregates these into hourly statistics required by Home Assistant
- Example: 21:00 (1.044 kWh) + 21:30 (0.538 kWh) = Hour 21:00 total: 1.582 kWh
To avoid hitting ESB's rate limit during development:
- Set environment variable:
ESB_DEBUG_CACHE=true - First successful fetch will cache data to
/config/esb_cache.json - Subsequent updates use cached data instead of hitting ESB API
Docker Compose example:
environment:
- ESB_DEBUG_CACHE=trueRemember to set ESB_DEBUG_CACHE=false for production use!
Add to configuration.yaml:
logger:
default: info
logs:
custom_components.esb_integration: debugTrigger a manual data fetch:
Developer Tools → Actions
- Service:
homeassistant.update_entity - Target:
sensor.esb_electricity_[YOUR_MPRN]
You've exceeded ESB's 2 login per 24-hour limit. Wait until midnight (Irish time) and try again.
- Check logs for parsing errors
- Verify your MPRN is correct
- Ensure your meter is linked to your ESB account
- Try clearing statistics and re-importing (see below)
To delete and re-import statistics:
Developer Tools → Actions
service: recorder.purge_entities
data:
entity_id:
- sensor.esb_electricity_[YOUR_MPRN]
keep_days: 0Then manually trigger an update.
This integration uses the ESB Networks API scraping logic from:
Special thanks to badger707 for documenting the ESB Networks API authentication flow.
This is an unofficial integration and is not affiliated with or endorsed by ESB Networks. Use at your own risk.
For issues, feature requests, or contributions, please open an issue on GitHub.