Skip to content

Commit

Permalink
fix: Support for fire-dom-event
Browse files Browse the repository at this point in the history
Fixes #563
  • Loading branch information
RomRider committed Feb 17, 2021
1 parent 1e78b2b commit bcf7ac4
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 bcf7ac4

Please sign in to comment.