custom-cards / custom-card-helpers

Custom Card Helper Functions/Types for Developers
https://custom-cards.github.io/custom-card-helpers/
MIT License
48 stars 29 forks source link

Breaking: HA 2023.4 (beta) no longer uses app-drawer-layout #72

Open Mariusthvdb opened 1 year ago

Mariusthvdb commented 1 year ago

breaking all cards that use this custom functionality

please see #beta in Discord.

app-drawer-layout was replaced by mwc-drawer

link to Discord: https://discord.com/channels/330944238910963714/427516175237382144/1090920193947074642

jcwillox commented 1 year ago

Indeed here's the patch I'm using, I'll create a PR to fix this 👍

diff --git a/src/get-lovelace.ts b/src/get-lovelace.ts
index ebde3e6bf5d86f793d9697d8c88b57bf7b004e7b..6a8afc3d32539a4f8a257926a7cf9972841c8343 100644
--- a/src/get-lovelace.ts
+++ b/src/get-lovelace.ts
@@ -3,7 +3,7 @@ export const getLovelace = () => {
     root = root && root.shadowRoot;
     root = root && root.querySelector('home-assistant-main');
     root = root && root.shadowRoot;
-    root = root && root.querySelector('app-drawer-layout partial-panel-resolver');
+    root = root && root.querySelector('ha-drawer partial-panel-resolver');
     root = root && root.shadowRoot || root;
     root = root && root.querySelector('ha-panel-lovelace');
     root = root && root.shadowRoot;

Here's the full patch https://github.com/jcwillox/lovelace-paper-buttons-row/blob/5fd0a3679c3558a854587894ee174ccbf5ce407f/patches/custom-card-helpers%401.9.0.patch