Skip to content

Commit

Permalink
Fix voice debug link (#23214)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Dec 8, 2024
1 parent c78d371 commit 8390c6e
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/panels/config/voice-assistants/assist-pref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { showVoiceAssistantPipelineDetailDialog } from "./show-dialog-voice-assi
import { showVoiceCommandDialog } from "../../../dialogs/voice-command-dialog/show-ha-voice-command-dialog";
import { stopPropagation } from "../../../common/dom/stop_propagation";
import { computeDomain } from "../../../common/entity/compute_domain";
import { navigate } from "../../../common/navigate";

@customElement("assist-pref")
export class AssistPref extends LitElement {
Expand Down Expand Up @@ -159,14 +160,16 @@ export class AssistPref extends LitElement {
)}
<ha-svg-icon slot="graphic" .path=${mdiStar}></ha-svg-icon>
</ha-list-item>
<a href=${`/config/voice-assistants/debug/${pipeline.id}`}>
<ha-list-item graphic="icon">
${this.hass.localize(
"ui.panel.config.voice_assistants.assistants.pipeline.detail.debug"
)}
<ha-svg-icon slot="graphic" .path=${mdiBug}></ha-svg-icon>
</ha-list-item>
</a>
<ha-list-item
graphic="icon"
.id=${pipeline.id}
@request-selected=${this._debugPipeline}
>
${this.hass.localize(
"ui.panel.config.voice_assistants.assistants.pipeline.detail.debug"
)}
<ha-svg-icon slot="graphic" .path=${mdiBug}></ha-svg-icon>
</ha-list-item>
<ha-list-item
class="danger"
graphic="icon"
Expand Down Expand Up @@ -233,6 +236,11 @@ export class AssistPref extends LitElement {
this._preferred = id;
}

private async _debugPipeline(ev) {
const id = ev.currentTarget.id as string;
navigate(`/config/voice-assistants/debug/${id}`);
}

private async _deletePipeline(ev) {
const id = ev.currentTarget.id as string;
if (this._preferred === id) {
Expand Down

0 comments on commit 8390c6e

Please sign in to comment.