Fix General Config Zone update on Mobile (#13011)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Zack Barett 2022-06-29 01:54:19 -05:00 committed by GitHub
parent 62d0882e82
commit 08eff0509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,6 +273,15 @@ class HaConfigSectionGeneral extends LitElement {
} }
button.progress = true; button.progress = true;
let locationConfig;
if (this._location) {
locationConfig = {
latitude: this._location[0],
longitude: this._location[1],
};
}
try { try {
await saveCoreConfig(this.hass, { await saveCoreConfig(this.hass, {
currency: this._currency, currency: this._currency,
@ -280,6 +289,7 @@ class HaConfigSectionGeneral extends LitElement {
unit_system: this._unitSystem, unit_system: this._unitSystem,
time_zone: this._timeZone, time_zone: this._timeZone,
location_name: this._name, location_name: this._name,
...locationConfig,
}); });
button.actionSuccess(); button.actionSuccess();
} catch (err: any) { } catch (err: any) {