0.0.13b6
Pre-release
Pre-release
Fix ekz_ha.reset_statistics: robust fallback for different HA versions
The previous b5 release could fail with "async_clear_statistics is not available" on some HA versions. This release adds two fallback layers:
- Module-level import (most HA versions):
from homeassistant.components.recorder.statistics import async_clear_statistics - Recorder instance method (some HA versions):
get_recorder_instance(hass).async_clear_statistics(statistic_ids)
Both sync (@callback) and async versions are handled automatically. If neither API is available, a clear error message is logged instead of silently returning.