Fix memory leak in firmata (#49467)
This commit is contained in:
parent
30c99ce954
commit
b2db9d3ca2
1 changed files with 3 additions and 1 deletions
|
@ -184,7 +184,9 @@ async def async_setup_entry(
|
|||
if config_entry.entry_id in hass.data[DOMAIN]:
|
||||
await board.async_reset()
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, handle_shutdown)
|
||||
config_entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, handle_shutdown)
|
||||
)
|
||||
|
||||
device_registry = await dr.async_get_registry(hass)
|
||||
device_registry.async_get_or_create(
|
||||
|
|
Loading…
Add table
Reference in a new issue