ha-entity-lifecycle
Installation
SKILL.md
Home Assistant — Entity Lifecycle and Registries
Entity Lifecycle
- Platform discovery:
async_setup_entrycalled on platform - Entity creation: Entities instantiated, passed to
async_add_entities - Registration: HA assigns
entity_id, registers in entity registry - First update:
async_added_to_hasscalled, initial state written - Updates: Coordinator triggers
_handle_coordinator_update - Removal:
async_will_remove_from_hassfor cleanup
from homeassistant.helpers.restore_state import RestoreEntity