Skip to content

Commit 085b388

Browse files
authored
Fix add to selected action (#28062)
1 parent a9c816e commit 085b388

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/dialogs/more-info/ha-more-info-add-to.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {
1111
import { showToast } from "../../util/toast";
1212

1313
import type { HomeAssistant } from "../../types";
14+
import { fireEvent } from "../../common/dom/fire_event";
1415

1516
@customElement("ha-more-info-add-to")
1617
export class HaMoreInfoAddTo extends LitElement {
@@ -51,6 +52,7 @@ export class HaMoreInfoAddTo extends LitElement {
5152
app_payload: action.app_payload,
5253
},
5354
});
55+
fireEvent(this, "add-to-action-selected");
5456
} catch (err: any) {
5557
showToast(this, {
5658
message: this.hass.localize(
@@ -149,4 +151,8 @@ declare global {
149151
interface HTMLElementTagNameMap {
150152
"ha-more-info-add-to": HaMoreInfoAddTo;
151153
}
154+
155+
interface HASSDomEvents {
156+
"add-to-action-selected": undefined;
157+
}
152158
}

src/dialogs/more-info/ha-more-info-dialog.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ export class MoreInfoDialog extends LitElement {
645645
<ha-more-info-add-to
646646
.hass=${this.hass}
647647
.entityId=${entityId}
648+
@add-to-action-selected=${this._goBack}
648649
></ha-more-info-add-to>
649650
`
650651
: nothing

0 commit comments

Comments
 (0)