mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Run unsubscribe callbacks when Assist satellite entity is removed from HA (#127234)
* Unsubscribe when removed from HA * Use builtin async_on_remove
This commit is contained in:
parent
46405d7738
commit
40dbfab671
@ -212,7 +212,7 @@ class EsphomeAssistSatellite(
|
||||
)
|
||||
if feature_flags & VoiceAssistantFeature.API_AUDIO:
|
||||
# TCP audio
|
||||
self.entry_data.disconnect_callbacks.add(
|
||||
self.async_on_remove(
|
||||
self.cli.subscribe_voice_assistant(
|
||||
handle_start=self.handle_pipeline_start,
|
||||
handle_stop=self.handle_pipeline_stop,
|
||||
@ -222,7 +222,7 @@ class EsphomeAssistSatellite(
|
||||
)
|
||||
else:
|
||||
# UDP audio
|
||||
self.entry_data.disconnect_callbacks.add(
|
||||
self.async_on_remove(
|
||||
self.cli.subscribe_voice_assistant(
|
||||
handle_start=self.handle_pipeline_start,
|
||||
handle_stop=self.handle_pipeline_stop,
|
||||
@ -235,7 +235,7 @@ class EsphomeAssistSatellite(
|
||||
assert (self.registry_entry is not None) and (
|
||||
self.registry_entry.device_id is not None
|
||||
)
|
||||
self.entry_data.disconnect_callbacks.add(
|
||||
self.async_on_remove(
|
||||
async_register_timer_handler(
|
||||
self.hass, self.registry_entry.device_id, self.handle_timer_event
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user