Skip to content

Commit

Permalink
Add check for conversation entity (#21736)
Browse files Browse the repository at this point in the history
* Add check for conversation entity

* Use true as default
  • Loading branch information
Shulyaka authored Aug 20, 2024
1 parent 5622180 commit 8ed68bf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@ export class HaVoiceCommandDialog extends LitElement {

const controlHA = !this._pipeline
? false
: supportsFeature(
this.hass.states[this._pipeline?.conversation_engine],
ConversationEntityFeature.CONTROL
);
: this.hass.states[this._pipeline?.conversation_engine]
? supportsFeature(
this.hass.states[this._pipeline?.conversation_engine],
ConversationEntityFeature.CONTROL
)
: true;
const supportsMicrophone = AudioRecorder.isSupported;
const supportsSTT = this._pipeline?.stt_engine;

Expand Down

0 comments on commit 8ed68bf

Please sign in to comment.