Add check for conversation entity (#21736)

* Add check for conversation entity

* Use true as default
This commit is contained in:
Denis Shulyaka 2024-08-20 14:53:07 +03:00 committed by GitHub
parent 5622180d42
commit 8ed68bf295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;