v1.5.1
🔧 Bug Fix: Entry Unload / Reload Error (closes #34)
This release fixes two related bugs in __init__.py that caused integration unload to fail with an AttributeError and prevented sensors from appearing immediately after setup.
Fixed
- ✅ AttributeError on unload (#34):
async_forward_entry_unloads(non-existent plural form) replaced with the correctasync_forward_entry_unload(singular). This caused every reload/unload of a counter entry to fail withAttributeError: 'ConfigEntries' object has no attribute 'async_forward_entry_unloads'. - ✅ Sensor not visible after adding counter (#34):
async_setup_entrywas wrappingasync_forward_entry_setupsinhass.async_create_task, scheduling setup asynchronously without awaiting it. The call is now properly awaited so the sensor entity is registered beforeasync_setup_entryreturns, making it visible immediately without requiring a full HA restart. - ✅ Incorrect return type in unload:
all()was called on theboolresult ofasync_forward_entry_unload; replaced with a directbool()cast to satisfy the return type.
Changed
- Removed unused
castandAnyimports from__init__.py. - Updated version to 1.5.1 in
manifest.json.