mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Voice wizard: prevent flash of hardware screen when cloud is active (#22933)
This commit is contained in:
parent
0e0be279ea
commit
64374a4fcb
@ -29,6 +29,8 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
|
|||||||
|
|
||||||
@property() public assistEntityId?: string;
|
@property() public assistEntityId?: string;
|
||||||
|
|
||||||
|
@state() private _cloudChecked = false;
|
||||||
|
|
||||||
@state() private _showFirst = false;
|
@state() private _showFirst = false;
|
||||||
|
|
||||||
@state() private _showSecond = false;
|
@state() private _showSecond = false;
|
||||||
@ -62,6 +64,10 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override render() {
|
protected override render() {
|
||||||
|
if (!this._cloudChecked) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
|
||||||
return html`<div class="content">
|
return html`<div class="content">
|
||||||
<h1>What hardware do you want to use?</h1>
|
<h1>What hardware do you want to use?</h1>
|
||||||
<p class="secondary">
|
<p class="secondary">
|
||||||
@ -130,10 +136,12 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
|
|||||||
|
|
||||||
private async _checkCloud() {
|
private async _checkCloud() {
|
||||||
if (!isComponentLoaded(this.hass, "cloud")) {
|
if (!isComponentLoaded(this.hass, "cloud")) {
|
||||||
|
this._cloudChecked = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const cloudStatus = await fetchCloudStatus(this.hass);
|
const cloudStatus = await fetchCloudStatus(this.hass);
|
||||||
if (!cloudStatus.logged_in || !cloudStatus.active_subscription) {
|
if (!cloudStatus.logged_in || !cloudStatus.active_subscription) {
|
||||||
|
this._cloudChecked = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let cloudTtsEntityId;
|
let cloudTtsEntityId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user