Skip to content

0.1.5

Choose a tag to compare

@dmoo500 dmoo500 released this 18 Apr 12:30

0.1.5

Bug Fixes

Fix — missing hours after HA restart
After a restart, last_import was restored from the most recent statistics entry in the DB. If the last imported day was incomplete (EKZ delivers data with a ~2-day delay), the missing hours were never fetched. Fix: on restart, last_import is always rewound by 1 day so the last day is always re-fetched in full.

Fix — unnecessary API calls into the future
to_date was always set to from_date + 30 days, even when that was in the future. The EKZ API returns only NOT_AVAILABLE entries for future dates, wasting a round-trip. Fix: to_date is now capped at tomorrow (local time).

Fix — reset_statistics did not clear prediction statistics
The ekz_ha.reset_statistics service tried to delete statistics under sensor.electricity_consumption_ekz_*_predictions (with an s), but statistics are written under *_prediction (without s). Prediction data therefore survived a reset. Fixed.