Update deps

This commit is contained in:
Georgi Gardev
2024-11-05 22:11:41 +02:00
parent b5ecab9aca
commit 36732636d0
3 changed files with 6 additions and 7 deletions

2
package-lock.json generated
View File

@@ -11,7 +11,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",

View File

@@ -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",

View File

@@ -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;