Home Assistant custom integration for CDEC stations and sensors. The default station is MBG (Briceburg), and the integration polls CDEC QueryF's current 15-minute data table.
This repository is packaged for HACS.
This repository is not in the default HACS catalog. Add it as a custom repository:
- Open HACS in Home Assistant.
- Open Integrations.
- Select the three-dot menu and choose Custom repositories.
- Enter
https://github.com/peluke/ha-cdec. - Select Integration as the category and click Add.
- Search for Home Assistant CDEC and select Download.
- Restart Home Assistant.
- Go to Settings > Devices & services > Add integration and select Home Assistant CDEC.
The station ID defaults to MBG, but you can monitor any station hosted by CDEC. Find the station ID here: CDEC station map. After selecting a station, find its sensor number here: CDEC sensor selector. You need both the station ID and sensor number during setup.
The integration creates one Latest observation entity per configured CDEC sensor, defaulting to sensors 20, 25, and 4. It discovers sensor types from CDEC, so other CDEC sensor numbers can be configured. The latest eight records for each sensor are available in the entity's observations attribute, with the full count in observation_count.
Polling frequency can be changed from the integration's Configure menu. CDEC updates its observations every 15 minutes, so polling more frequently does not provide newer data and only creates unnecessary requests. The default and recommended interval is 15 minutes. Longer intervals can be used when immediate updates are not required.
python -m pytest tests
The integration has no API key and stores no secrets.
The technical integration domain remains briceburg_cdec for compatibility with existing HACS installations and Home Assistant config entries. The user-facing integration and HACS package name is Home Assistant CDEC.