mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 21:17:47 +00:00
convert default options to Ha-Form
This commit is contained in:
parent
9eea17b793
commit
7a0e77c3b1
@ -85,11 +85,12 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
||||
"ui.panel.config.automation.editor.actions.type.choose.default"
|
||||
)}:
|
||||
</h2>
|
||||
<ha-automation-action
|
||||
.actions=${action.default || []}
|
||||
@value-changed=${this._defaultChanged}
|
||||
<ha-form
|
||||
.hass=${this.hass}
|
||||
></ha-automation-action>
|
||||
.schema=${[{ name: "default", selector: { action: {} } }]}
|
||||
.data=${action.default ? action : { default: [] }}
|
||||
@value-changed=${this._defaultChanged}
|
||||
></ha-form>
|
||||
`;
|
||||
}
|
||||
|
||||
@ -142,7 +143,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
||||
|
||||
private _defaultChanged(ev: CustomEvent) {
|
||||
ev.stopPropagation();
|
||||
const value = ev.detail.value as Action[];
|
||||
const value = ev.detail.value.default as Action[];
|
||||
fireEvent(this, "value-changed", {
|
||||
value: {
|
||||
...this.action,
|
||||
|
Loading…
x
Reference in New Issue
Block a user