mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Hide network config when not loaded (#9265)
This commit is contained in:
parent
b0e1f0f73a
commit
8291a84e3e
@ -30,20 +30,17 @@ class ConfigNetwork extends LitElement {
|
|||||||
@state() private _error?: string;
|
@state() private _error?: string;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
if (!this.hass.userData?.showAdvanced) {
|
if (
|
||||||
|
!this.hass.userData?.showAdvanced ||
|
||||||
|
!isComponentLoaded(this.hass, "network")
|
||||||
|
) {
|
||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
const error = this._error
|
|
||||||
? this._error
|
|
||||||
: !isComponentLoaded(this.hass, "network")
|
|
||||||
? "Network integration not loaded"
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-card header="Network">
|
<ha-card header="Network">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
${error ? html`<div class="error">${error}</div>` : ""}
|
${this._error ? html`<div class="error">${this._error}</div>` : ""}
|
||||||
<p>
|
<p>
|
||||||
Configure which network adapters integrations will use. Currently
|
Configure which network adapters integrations will use. Currently
|
||||||
this setting only affects multicast traffic. A restart is required
|
this setting only affects multicast traffic. A restart is required
|
||||||
|
Loading…
x
Reference in New Issue
Block a user