Skip to content

Commit

Permalink
Voice assistants config: Filter unavailable assists (#23637)
Browse files Browse the repository at this point in the history
Filter unavailable assists from num of assist devices.
  • Loading branch information
wendevlin authored Jan 8, 2025
1 parent f75f4b9 commit c6aec2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/panels/config/voice-assistants/assist-pref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export class AssistPref extends LitElement {
this._preferred = pipelines.preferred_pipeline;
});
this._pipelineEntitiesCount = Object.values(this.hass.entities).filter(
(entity) => computeDomain(entity.entity_id) === "assist_satellite"
(entity) =>
computeDomain(entity.entity_id) === "assist_satellite" &&
this.hass.states[entity.entity_id].state !== "unavailable"
).length;
}

Expand Down

0 comments on commit c6aec2d

Please sign in to comment.