marcokreeft87 / ha-editor-formbuilder

0 stars 1 forks source link

Editor does not work in stack #2

Open CybDis opened 3 months ago

CybDis commented 3 months ago

I'm using a project using your editor: https://github.com/CybDis/lovelace-flower-card-mod

When using the lovelace-flower-card in a vertical-/horizontal stack setting, it does not update the config corresponsing the selected card. It always shows first card (Flammenblume 1) instead of the selected card (Tomate):

image

When changing a setting (checking a checkbox) it updates the displayed entities:
image

So I think some update-trigger is missing to relead the config.
Would you have a look into it?

marcokreeft87 commented 3 months ago

Can you share the yaml?

CybDis commented 3 months ago

sure:

type: vertical-stack cards:

marcokreeft87 commented 3 months ago

Hmm don't think the problem lies within the editor code tbh. A lot of custom cards and a few native HA cards won't display correctly in horizontal-stack or vertical-stack in editor.

Have you tried it without the horizontal-stack?

CybDis commented 3 months ago

It shows the same behavior in pure vertical stack,
and the same in pure horizontal stack.

when using it as single card on the dashboard, there cannot be a mix-up so it works, like it works for the 1st card in every stack.

marcokreeft87 commented 3 months ago

Ok I will take a look at it. But won't be very soon I'm afraid

CybDis commented 3 months ago

not sure if it has something to do with it, but in the console I get following error:

17:31:29.481 -- [WARNING] The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information. -- on line 331 of https://192.168.1.6:8123/hacsfiles/lovelace-flower-card-mod/flower-card.js?hacstag=779356749202445

The EditorForm extends LitElement

CybDis commented 3 months ago

That's it - I forked and updated from 'lit-element' to 'lit' and everything now works again
see -> https://github.com/marcokreeft87/ha-editor-formbuilder/compare/master...CybDis:ha-editor-formbuilder:master

marcokreeft87 commented 3 months ago

Nice! I've pulled the changes. Try it again plz

marcokreeft87 commented 3 months ago

Oh the build failed. Let me check that tomorrow morning

CybDis commented 3 months ago

ok.

remember to undo my readme.md changes

marcokreeft87 commented 2 months ago

Apparently I forgot how the auto publish worked haha. But its published now.