Skip to content

Commit

Permalink
fix: Support for fire-dom-event
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider authored and jlsjonas committed Jan 22, 2022
1 parent 2956f54 commit c29f55f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/handleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export default (node, hass, config, actionConfig, entityId) => {
case 'url': {
if (!actionConfig.url) return;
window.location.href = actionConfig.url;
break;
}
case 'fire-dom-event': {
e = new Event('ll-custom', { composed: true, bubbles: true });
e.detail = actionConfig;
node.dispatchEvent(e);
break;
}
}
};

0 comments on commit c29f55f

Please sign in to comment.