Skip to content

Commit

Permalink
Use stt-vad-end event in assist debug panel (#18671)
Browse files Browse the repository at this point in the history
* Use stt-vad-end event in assist debug panel

* Remove end_suffix
  • Loading branch information
synesthesiam authored Nov 15, 2023
1 parent 08a7a10 commit f2efff9
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ const maybeRenderError = (
const renderProgress = (
hass: HomeAssistant,
pipelineRun: PipelineRun,
stage: PipelineRun["stage"]
stage: PipelineRun["stage"],
start_suffix: string = "-start"
) => {
const startEvent = pipelineRun.events.find(
(ev) => ev.type === `${stage}-start`
(ev) => ev.type === `${stage}` + start_suffix
);
const finishEvent = pipelineRun.events.find(
(ev) => ev.type === `${stage}-end`
Expand Down Expand Up @@ -244,7 +245,12 @@ export class AssistPipelineDebug extends LitElement {
<div class="card-content">
<div class="row heading">
<span>Speech-to-text</span>
${renderProgress(this.hass, this.pipelineRun, "stt")}
${renderProgress(
this.hass,
this.pipelineRun,
"stt",
"-vad-end"
)}
</div>
${this.pipelineRun.stt
? html`
Expand Down

0 comments on commit f2efff9

Please sign in to comment.