diff --git a/linux_voice_assistant/entity.py b/linux_voice_assistant/entity.py index d3b93f8..a05986a 100644 --- a/linux_voice_assistant/entity.py +++ b/linux_voice_assistant/entity.py @@ -122,7 +122,7 @@ class MediaPlayerEntity(ESPHomeEntity): self.announce_player.play( url, done_callback=lambda: call_all( - self._broadcast_state([self._update_state(MediaPlayerState.IDLE)]), + lambda: self._broadcast_state([self._update_state(MediaPlayerState.IDLE)]), done_callback, ), ) @@ -132,7 +132,7 @@ class MediaPlayerEntity(ESPHomeEntity): self.music_player.play( url, done_callback=lambda: call_all( - self._broadcast_state([self._update_state(MediaPlayerState.IDLE)]), + lambda: self._broadcast_state([self._update_state(MediaPlayerState.IDLE)]), done_callback, ), ) diff --git a/linux_voice_assistant/satellite.py b/linux_voice_assistant/satellite.py index 1d9e67b..60ceff3 100644 --- a/linux_voice_assistant/satellite.py +++ b/linux_voice_assistant/satellite.py @@ -1027,15 +1027,15 @@ class VoiceSatelliteProtocol(APIServer): # Stop any ongoing audio playback and wake/stop word processing. try: self.state.music_player.stop() - except Exception: # pragma: no cover - defensive safety net + except Exception: # pylint: disable=broad-except _LOGGER.exception("Failed to stop music player during disconnect") try: self.state.tts_player.stop() - except Exception: # pragma: no cover - defensive safety net + except Exception: # pylint: disable=broad-except _LOGGER.exception("Failed to stop TTS player during disconnect") - self.state.stop_word.is_active = False + self.state.stop_word.is_active = False # type: ignore[attr-defined] self.state.connected = False if self.state.satellite is self: