mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +00:00
Fix setting service data on load when in yaml mode
This commit is contained in:
parent
5f1851bade
commit
b6eaf0a7c5
@ -48,6 +48,11 @@ class HaPanelDevService extends LitElement {
|
||||
target: {},
|
||||
data: {},
|
||||
};
|
||||
if (this._yamlMode) {
|
||||
this.updateComplete.then(() =>
|
||||
this._yamlEditor?.setValue(this._serviceData)
|
||||
);
|
||||
}
|
||||
} else if (!this._serviceData?.service) {
|
||||
const domain = Object.keys(this.hass.services).sort()[0];
|
||||
const service = Object.keys(this.hass.services[domain]).sort()[0];
|
||||
@ -56,6 +61,11 @@ class HaPanelDevService extends LitElement {
|
||||
target: {},
|
||||
data: {},
|
||||
};
|
||||
if (this._yamlMode) {
|
||||
this.updateComplete.then(() =>
|
||||
this._yamlEditor?.setValue(this._serviceData)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user