A custom Home Assistant integration for monitoring your energy consumption data from HelloWatt, a French energy monitoring service.
This integration provides real-time access to your energy consumption data:
- Daily electricity consumption (kWh)
- Peak hours (HP) and off-peak hours (HC) consumption for dual-rate contracts
- Yesterday's consumption
- Weekly consumption total
- CO2 emissions tracking
- Cost breakdown (total, consumption, and subscription costs)
- Daily gas consumption (kWh)
- Yesterday's consumption
- Weekly consumption total
- CO2 emissions tracking
- Cost breakdown (total, consumption, and subscription costs)
- Temperature monitoring
- Historical data import service
- Multi-home/PDL support
- Automatic session management with re-authentication
- Device information with contract details
-
Copy the
custom_components/hellowattdirectory to your Home Assistantcustom_componentsfolder:<config_directory>/custom_components/hellowatt/ -
Restart Home Assistant
-
Go to Configuration > Integrations
-
Click the + button and search for "HelloWatt"
-
Enter your HelloWatt credentials (email and password)
This integration is not yet available in HACS. Follow the manual installation steps above.
- Navigate to Settings > Devices & Services
- Click "Add Integration"
- Search for "HelloWatt"
- Enter your HelloWatt account credentials:
- Email: Your HelloWatt account email
- Password: Your HelloWatt account password
The integration will automatically discover all homes (PDLs) associated with your account and create sensors for each.
After the integration is set up, click Configure on the HelloWatt integration card to adjust:
| Option | Default | Range | Description |
|---|---|---|---|
| Update Interval | 1 hour | 1–24 hours | How often to poll the HelloWatt API |
| Data Recovery Period | 7 days | 3–30 days | How many days of data to fetch per update — increasing this helps recover missed updates |
The integration creates the following sensors for each PDL (Point de Livraison):
| Sensor | Description | Unit | State Class |
|---|---|---|---|
sensor.electricity_daily |
Today's electricity consumption | kWh | total |
sensor.electricity_peak_hours_daily |
Peak hours consumption (HP contracts) | kWh | total |
sensor.electricity_off_peak_hours_daily |
Off-peak hours consumption (HC contracts) | kWh | total |
sensor.electricity_day_before |
Yesterday's consumption | kWh | total |
sensor.electricity_weekly |
Last 7 days consumption | kWh | total |
sensor.electricity_co2_emissions_daily |
Daily CO2 emissions | kg | total_increasing |
sensor.electricity_cost_daily |
Total daily electricity cost | EUR | total |
sensor.electricity_cost_consumption_daily |
Consumption cost only | EUR | total |
sensor.electricity_cost_subscription_daily |
Subscription cost | EUR | total |
| Sensor | Description | Unit | State Class |
|---|---|---|---|
sensor.gas_daily |
Today's gas consumption | kWh | total |
sensor.gas_day_before |
Yesterday's consumption | kWh | total |
sensor.gas_weekly |
Last 7 days consumption | kWh | total |
sensor.gas_co2_emissions_daily |
Daily CO2 emissions | kg | total_increasing |
sensor.gas_cost_daily |
Total daily gas cost | EUR | total |
sensor.gas_cost_consumption_daily |
Consumption cost only | EUR | total |
sensor.gas_cost_subscription_daily |
Subscription cost | EUR | total |
| Sensor | Description | Unit | State Class |
|---|---|---|---|
sensor.temperature |
Current temperature | °C | measurement |
| Sensor | Description | Unit | State Class |
|---|---|---|---|
sensor.contract_provider |
Energy contract provider name | — | — |
sensor.contract_offer |
Energy contract offer name | — | — |
These sensors are in the Diagnostic entity category and are hidden by default in the Home Assistant UI. They reflect the active contract data fetched from HelloWatt.
Import historical consumption data from HelloWatt into Home Assistant's long-term statistics.
Parameters:
start_date(required): Start date for import (YYYY-MM-DD)end_date(optional): End date for import (YYYY-MM-DD), defaults to 2 days agopdl(optional): Specific PDL to import data for, leave empty to import all PDLs
Example:
service: hellowatt.import_historical_data
data:
start_date: "2023-01-01"
end_date: "2024-12-31"
pdl: "12345678901234"Notes:
- Data is imported month by month to avoid API rate limits
- The API typically has data available up to D-2 (2 days ago)
- Historical data is imported into Home Assistant's statistics database
- Supports both electricity and gas data where available
Clear all HelloWatt statistics from the Home Assistant database. Use this before re-importing data to avoid conflicts with old metadata.
Parameters:
pdl(optional): Specific PDL to clear statistics for, leave empty to clear all PDLs
Example:
service: hellowatt.clear_statistics
data:
pdl: "12345678901234"Notes:
- Restart Home Assistant after clearing to refresh the Energy Dashboard
- This removes only historical statistics records — sensor entities are not deleted
- Use in combination with
import_historical_datawhen you need to re-import a date range from scratch
- The integration polls the HelloWatt API every hour
- Data represents consumption from the previous day (D-1), as energy providers typically report with a 1-day delay
- Automatic re-authentication handles session expiration
Each PDL appears as a separate device in Home Assistant with the following information:
- Manufacturer: HelloWatt
- Model: Energy Monitor
- Software Version: Contract provider and offer name
- Configuration URL: Direct link to HelloWatt account dashboard
Main integration setup and historical data import service:
- Entry setup and teardown
- API client initialization with cookie-based session management
- Multi-PDL coordinator creation
HelloWatt API client:
- Session-based authentication with CSRF token handling
- Automatic session refresh on 403 errors
- Methods for fetching consumption data (electricity and gas)
- Temperature and contract data retrieval
- Comprehensive error logging
Data update coordinator:
- Hourly data refresh
- Fetches 7 days of historical data for reliability
- Processes electricity, gas, and temperature data
- Extracts contract information
- Error handling with
UpdateFailedexceptions
Sensor platform implementation:
- Dynamic sensor creation based on available data
- Device grouping by PDL
- Support for energy, cost, and CO2 sensors
- Proper Home Assistant entity configuration
Historical data import and statistics management:
import_historical_dataandclear_statisticsservice handlers- Monthly chunked import with retry logic (exponential backoff on 5xx errors)
- Cumulative sum seeding so partial re-imports don't reset running totals
- Negative value clamping for data quality
Home Assistant diagnostics support:
- Config-entry diagnostics: coordinator status, available sensor keys, HP/HC detection, entity states
- Per-device diagnostics: all current sensor values for a specific PDL
- Access via Settings > Devices & Services > HelloWatt > three-dot menu > Download Diagnostics
System health reporting visible in Settings > System > System Information:
- API endpoint reachability check
- Number of configured accounts and total PDL coordinators
Configuration flow:
- User-friendly setup via UI
- Username and password collection
- Unique ID based on username to prevent duplicates
Constants and configuration:
- Domain definition
- API URL
- Logger configuration
The integration communicates with the HelloWatt API:
- Base URL:
https://www.hellowatt.fr/api - Authentication: Cookie-based session with CSRF tokens
- Endpoints used:
/homes- List available homes/PDLs/homes/{home_id}/sge_measures/conso_daily- Electricity consumption/homes/{home_id}/adict_measures/conso_daily- Gas consumption/homes/{home_id}/temperature_measures/yearly- Temperature data/homes/{home_id}/contracts- Contract information
- Check that your HelloWatt account has active energy contracts
- Verify that data is available for your PDL on the HelloWatt website
- Check Home Assistant logs for authentication errors
- These sensors only appear for dual-rate (HP/HC) electricity contracts
- Base rate contracts will only show the total consumption sensor
- Gas sensors only appear if you have an active gas contract
- The integration gracefully handles missing gas data
- Ensure end_date is at least 2 days in the past (API limitation)
- Check that you have sufficient data available on HelloWatt's website
- Review logs for specific API errors
custom_components/hellowatt/
├── __init__.py # Integration setup and service registration
├── client.py # API client
├── config_flow.py # Configuration UI and options flow
├── const.py # Constants
├── coordinator.py # Data update coordinator
├── diagnostics.py # HA diagnostics support
├── importer.py # Historical data import & statistics management
├── manifest.json # Integration metadata
├── sensor.py # Sensor entities
├── services.yaml # Service definitions
├── strings.json # UI strings
└── system_health.py # System health reporting
- CoordinatorEntity: Efficient state management and updates
- Async/Await: Non-blocking API calls
- Session Management: Automatic re-authentication on expiry
- Multi-home Support: Separate coordinator per PDL
- External Statistics: Long-term historical data storage
Contributions are welcome. Please ensure:
- Code follows Home Assistant coding standards
- All sensors have proper device classes and units
- Changes are tested with real HelloWatt accounts
- Documentation is updated
This integration is provided as-is. Please check the LICENSE file for details.
Developed for use with the HelloWatt energy monitoring service (https://www.hellowatt.fr/).
This is an unofficial integration and is not affiliated with or endorsed by HelloWatt. Use at your own risk.