Force enable interface if configured (#7785)

This commit is contained in:
Joakim Sørensen 2020-11-23 17:22:23 +01:00 committed by GitHub
parent 7f089c309f
commit d7d1121f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -391,10 +391,11 @@ export class DialogHassioNetwork extends LitElement
nameservers: this._toArray(this._interface![version]?.nameservers),
};
}
});
if (this._wifiConfiguration) {
interfaceOptions = {
...interfaceOptions,
enabled: true,
wifi: {
ssid: this._wifiConfiguration.ssid,
mode: this._wifiConfiguration.mode,
@ -408,7 +409,11 @@ export class DialogHassioNetwork extends LitElement
};
}
}
});
interfaceOptions.enabled =
this._wifiConfiguration !== undefined ||
interfaceOptions.ipv4?.method !== "disabled" ||
interfaceOptions.ipv6?.method !== "disabled";
try {
await updateNetworkInterface(