Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeSG committed Nov 5, 2024
1 parent b5ecab9 commit 3673263
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"custom-card-helpers": "^1.9.0",
"home-assistant-js-websocket": "^8.0.0",
"lit": "^2.4.0"
"lit": "^2.8.0"
},
"devDependencies": {
"@el3um4s/rollup-plugin-terser": "^1.0.2",
Expand Down
9 changes: 4 additions & 5 deletions src/action-handler-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,15 @@ class ActionHandler extends HTMLElement implements ActionHandler {
}
}

// TODO You need to replace all instances of "action-handler-boilerplate" with "action-handler-<your card name>"
customElements.define('action-handler-boilerplate', ActionHandler);
customElements.define('action-handler-time-picker-card', ActionHandler);

const getActionHandler = (): ActionHandler => {
const body = document.body;
if (body.querySelector('action-handler-boilerplate')) {
return body.querySelector('action-handler-boilerplate') as ActionHandler;
if (body.querySelector('action-handler-time-picker-card')) {
return body.querySelector('action-handler-time-picker-card') as ActionHandler;
}

const actionhandler = document.createElement('action-handler-boilerplate');
const actionhandler = document.createElement('action-handler-time-picker-card');
body.appendChild(actionhandler);

return actionhandler as ActionHandler;
Expand Down

0 comments on commit 3673263

Please sign in to comment.