Fix default action config on menu selection.

This commit is contained in:
Dermot Duffy
2022-01-28 19:34:44 -08:00
parent 74333dfac7
commit e7e20f74fb
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -514,5 +514,9 @@ export const frigateCardHandleAction = (
}, },
action: string, action: string,
): void => { ): void => {
handleActionConfig(node, hass, config, getActionConfigGivenAction(action, config)); const actionConfig = getActionConfigGivenAction(action, config);
if (actionConfig || action == 'tap') {
// Only allow a tap action to use a default non-config (the more-info config).
handleActionConfig(node, hass, config, actionConfig);
}
}; };
+1 -1
View File
@@ -81,7 +81,7 @@ export class FrigateCardMenu extends LitElement {
config = ev.detail.config; config = ev.detail.config;
} }
// These interactions should only be handled by the card, as nothing // These interactions should only be handled by the menu, as nothing
// upstream has the user-provided configuration. // upstream has the user-provided configuration.
ev.stopPropagation(); ev.stopPropagation();