mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Fix unit and currency, always select first result of search (#17753)
* Fix unit and currency, always select first result of search * Update onboarding-location.ts
This commit is contained in:
parent
f3ed0160af
commit
93846a2867
@ -32,10 +32,6 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
|
|
||||||
private _elevation = "0";
|
private _elevation = "0";
|
||||||
|
|
||||||
private _unitSystem: ConfigUpdateValues["unit_system"] = "metric";
|
|
||||||
|
|
||||||
private _currency: ConfigUpdateValues["currency"] = "EUR";
|
|
||||||
|
|
||||||
private _timeZone: ConfigUpdateValues["time_zone"] =
|
private _timeZone: ConfigUpdateValues["time_zone"] =
|
||||||
Intl.DateTimeFormat?.().resolvedOptions?.().timeZone;
|
Intl.DateTimeFormat?.().resolvedOptions?.().timeZone;
|
||||||
|
|
||||||
@ -43,6 +39,10 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
|
|
||||||
@state() private _country?: ConfigUpdateValues["country"];
|
@state() private _country?: ConfigUpdateValues["country"];
|
||||||
|
|
||||||
|
private _unitSystem?: ConfigUpdateValues["unit_system"];
|
||||||
|
|
||||||
|
private _currency?: ConfigUpdateValues["currency"];
|
||||||
|
|
||||||
@state() private _error?: string;
|
@state() private _error?: string;
|
||||||
|
|
||||||
@state() private _skipCore = false;
|
@state() private _skipCore = false;
|
||||||
|
@ -336,7 +336,7 @@ class OnboardingLocation extends LitElement {
|
|||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
this._places = await searchPlaces(address, this.hass, true, 3);
|
this._places = await searchPlaces(address, this.hass, true, 3);
|
||||||
if (this._places?.length === 1) {
|
if (this._places?.length) {
|
||||||
this._highlightedMarker = this._places[0].place_id;
|
this._highlightedMarker = this._places[0].place_id;
|
||||||
this._location = [
|
this._location = [
|
||||||
Number(this._places[0].lat),
|
Number(this._places[0].lat),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user