mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Force enable interface if configured (#7785)
This commit is contained in:
parent
7f089c309f
commit
d7d1121f7d
@ -391,25 +391,30 @@ export class DialogHassioNetwork extends LitElement
|
|||||||
nameservers: this._toArray(this._interface![version]?.nameservers),
|
nameservers: this._toArray(this._interface![version]?.nameservers),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (this._wifiConfiguration) {
|
|
||||||
interfaceOptions = {
|
|
||||||
...interfaceOptions,
|
|
||||||
enabled: true,
|
|
||||||
wifi: {
|
|
||||||
ssid: this._wifiConfiguration.ssid,
|
|
||||||
mode: this._wifiConfiguration.mode,
|
|
||||||
auth: this._wifiConfiguration.auth || "open",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
if (interfaceOptions.wifi!.auth !== "open") {
|
|
||||||
interfaceOptions.wifi = {
|
|
||||||
...interfaceOptions.wifi,
|
|
||||||
psk: this._wifiConfiguration.psk,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this._wifiConfiguration) {
|
||||||
|
interfaceOptions = {
|
||||||
|
...interfaceOptions,
|
||||||
|
wifi: {
|
||||||
|
ssid: this._wifiConfiguration.ssid,
|
||||||
|
mode: this._wifiConfiguration.mode,
|
||||||
|
auth: this._wifiConfiguration.auth || "open",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (interfaceOptions.wifi!.auth !== "open") {
|
||||||
|
interfaceOptions.wifi = {
|
||||||
|
...interfaceOptions.wifi,
|
||||||
|
psk: this._wifiConfiguration.psk,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interfaceOptions.enabled =
|
||||||
|
this._wifiConfiguration !== undefined ||
|
||||||
|
interfaceOptions.ipv4?.method !== "disabled" ||
|
||||||
|
interfaceOptions.ipv6?.method !== "disabled";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await updateNetworkInterface(
|
await updateNetworkInterface(
|
||||||
this.hass,
|
this.hass,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user