From 08eff0509a3691b2534be64492c90b9ed4f657f8 Mon Sep 17 00:00:00 2001 From: Zack Barett Date: Wed, 29 Jun 2022 01:54:19 -0500 Subject: [PATCH] Fix General Config Zone update on Mobile (#13011) Co-authored-by: Bram Kragten --- src/panels/config/core/ha-config-section-general.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/panels/config/core/ha-config-section-general.ts b/src/panels/config/core/ha-config-section-general.ts index 2f9588e8ad..a2123ddf24 100644 --- a/src/panels/config/core/ha-config-section-general.ts +++ b/src/panels/config/core/ha-config-section-general.ts @@ -273,6 +273,15 @@ class HaConfigSectionGeneral extends LitElement { } button.progress = true; + let locationConfig; + + if (this._location) { + locationConfig = { + latitude: this._location[0], + longitude: this._location[1], + }; + } + try { await saveCoreConfig(this.hass, { currency: this._currency, @@ -280,6 +289,7 @@ class HaConfigSectionGeneral extends LitElement { unit_system: this._unitSystem, time_zone: this._timeZone, location_name: this._name, + ...locationConfig, }); button.actionSuccess(); } catch (err: any) {