The versatile custom Swiss Army Knife card for Home Assistant allows you to create your unique visualization using several graphical tools, styling options and animations.
244
stars
21
forks
source link
Support for custom popups in the actions configuration #203
case "fire-dom-event": {
fireEvent(node, "ll-custom", actionConfig);
if (actionConfig.haptic) forwardHaptic(actionConfig.haptic);
break;
actionConfig contains the full configuration of the action, so includes the .action field for instance.
Using browser_mod means support for fire-dom-event in the actions configuration and eventhandler in SAK, which is a combination of handleTapEvent() and _processTrapEvent().
Looking from the other side: support for fire-dom-event means support for all the browser_mod callable functions, including notifications and more!
The Problem To Be Solved
The current implementation supports the following user actions:
Displaying a custom popup window is not possible.
Additional background:
See: https://community.home-assistant.io/t/lovelace-versatile-swiss-army-knife-custom-card/432419/95
Related Issues (if any)
(Optional): Suggested Solution
For now, check how other cards allow for custom popups, and check if this configuration can be re-used for consistency with other cards...
Most examples use the
browser_mod
extension to allow for custom popups using thefire-dom-event
action and browser_mod configuration:The custom-card-helpers has this solution in https://github.com/custom-cards/custom-card-helpers/blob/master/src/handle-click.ts:
actionConfig
contains the full configuration of the action, so includes the.action
field for instance.Using browser_mod means support for
fire-dom-event
in the actions configuration and eventhandler in SAK, which is a combination ofhandleTapEvent()
and_processTrapEvent()
.Looking from the other side: support for
fire-dom-event
means support for all the browser_mod callable functions, including notifications and more!(Optional): Alternative Solutions