Fetch OS info from Supervisor if we do not return anything for hardware (#13614)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Joakim Sørensen 2022-09-06 11:48:41 +02:00 committed by GitHub
parent f461825a59
commit 00bc315fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,7 +352,9 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
try {
if (isComponentLoaded(this.hass, "hardware")) {
this._hardwareInfo = await this.hass.callWS({ type: "hardware/info" });
} else if (isHassioLoaded) {
}
if (isHassioLoaded && !this._hardwareInfo?.hardware.length) {
this._OSData = await fetchHassioHassOsInfo(this.hass);
}