mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-07 17:36:29 +00:00
Update config_entries_index.md
This commit is contained in:
parent
bd46242622
commit
9ad66609ca
@ -123,3 +123,12 @@ add `async_unload_entry(hass, entry)` to your component ([example](https://githu
|
||||
|
||||
Platforms will not need to add any logic for unloading a config entry. The entity component will take care of this.
|
||||
If you need to clean up resources used for an entity, implement the `async_will_remove_from_hass` method on the Entity ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/media_player/cast.py#L313)).
|
||||
|
||||
## Removal of entries
|
||||
|
||||
If a component needs to clean up code when an entry is removed, it can define a removal method:
|
||||
|
||||
```python
|
||||
def async_remove_entry(hass, entry) -> None:
|
||||
"""Handle removal of an entry."""
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user