flixlix / power-flow-card-plus

A power distribution card inspired by the official Energy Distribution card for Home Assistant
501 stars 59 forks source link

I is not possible to Setup Individual #551

Closed Timer2000 closed 2 months ago

Timer2000 commented 2 months ago

Hello,

I have updated to the new v2.0 Version.

After Update the Configuration was broken beacause i have two individuell settings. So i have it disabled by # in the Code Editor. The Power Card works aigain.

My next Step was to setup the individuell Entities by the new visual Editor.

I can put some Entities in the Config, but i can not configure them. All Settings in the individuell Menü can not saved. After close an open this Menü aigain it is all empty. In the Code Editor i do not found the Settings for individuell Points. Also my disabled Lines are not visible.

Timer

Jeronimo1971 commented 2 months ago

Same here, see issue: https://github.com/flixlix/power-flow-card-plus/issues/550

flixlix commented 2 months ago

I'm sorry, but I do not understand exactly what the issue here is. Can you go step by step (with screenshots), explaining what you see vs. what you expected?

I cannot replicate the issue you described. In my setup, I can create a card, add individual devices and save the configuration and everything works as expected.

Can you try adding a new card with no previous configuration? Maybe there is still something left from the old configuration

theeye1000 commented 2 months ago

Same issue on my side.

  1. I have done the update
  2. After the Update it was not possible to use the graphical editor, because the old individuals was in the code
  3. For that... i have delete in the "old" induvidual code in the code Editor.
  4. now the graphical editor show the possible settings
  5. when i add a individual and want to make some settings it will be only save the entity in the code but noch the settings

when i put the code manualy with the code editor it is working fine.

What i have tested:

  1. reload the frontend from the repository
  2. uninstall and install the frontend
  3. clear cache in browser
  4. adding a new card

grafik

when i save with toggle on it will not save the config... see the code: grafik

Timer2000 commented 2 months ago

here my Power Card

grafik

here the Menü for this

grafik

grafik

the Menü with my Settings

grafik

but after Saving it shows this again

grafik

Timer2000 commented 2 months ago

Where can i find the Settings for Individual? It is possible to Setup this by CodeEditor? Maybe it ist a bug from the UI.

theeye1000 commented 2 months ago

Where can i find the Settings for Individual? It is possible to Setup this by CodeEditor? Maybe it ist a bug from the UI.

With the CodeEditor it ti possible. I also think that it is a bug in the UI.

flixlix commented 2 months ago

Where can i find the Settings for Individual?

The settings for individual should be pretty straightforward to find:

  1. In the main menu, click:

    image
  2. Then click:

    image
  3. Here are the settings:

    image
flixlix commented 2 months ago

I can't replicate this issue

https://github.com/flixlix/power-flow-card-plus/assets/61006057/68e9a735-f37c-46a5-8173-c4b182cd9cc5

Jeronimo1971 commented 2 months ago

I can't replicate this issue

Screen.Recording.2024-04-14.at.17.35.41.mov

Strange, works perfect in the "code editor" when i change something... but nothings works in the "visual editor"? Removed the card, reinstalled it... but the same strange thing with the visual editor?

flixlix commented 2 months ago

hmm, very strange indeed... What browser are you using? any errors in the browser console?

GitittomeNow commented 2 months ago

Same issue with being unable to save the name of the individuals from the GUI. (happens via Safari browser on windows and also iOS Home Assistant app)

Jeronimo1971 commented 2 months ago

hmm, very strange indeed... What browser are you using? any errors in the browser console?

Different browsers: Safari, Chrome: all the same. GUI nothing changes, code: works perfect! The extra strange thing: UI works fine for all others BUT for the individual settings?!

flixlix commented 2 months ago

@Jeronimo1971 I also used multiple browsers (Chrome, Brave, Firefox, Safari) and don't get the error in any of those 😅 Do you get any errors in the browser console?

Timer2000 commented 2 months ago

hmm, very strange indeed... What browser are you using? any errors in the browser console?

Different browsers: Safari, Chrome: all the same. GUI nothing changes, code: works perfect! The extra strange thing: UI works fine for all others BUT for the individual settings?!

Exact the same here. I have setup this by Code Editor, this works. I have test the ui by different Hard- and Software. No Chance.

Jeronimo1971 commented 2 months ago

@Jeronimo1971 I also used multiple browsers (Chrome, Brave, Firefox, Safari) and don't get the error in any of those 😅 Do you get any errors in the browser console?

No errors: I can type in the fields (like name), but when a change the view to code or exit and re-enter... nothing is changed. When a change the name in the code, it's immediately displayed in the view?!

flixlix commented 2 months ago

this is very strange I've already tried this in two HA installations and had no issues...

The only thing I can think of is a possible conflict with another card. Do you have Card Mod or similar installed? Can you try uninstalling it

Jeronimo1971 commented 2 months ago

this is very strange I've already tried this in two HA installations and had no issues...

it's one of the great mysteries of programming :-) In any case, great adjustments to the card with the new individual additions (even if it is via code) 👍

theeye1000 commented 2 months ago

hmm, very strange indeed... What browser are you using? any errors in the browser console?

I got this error in the console 322274923-77c9d08b-1156-4573-959c-5a05c7676ebf.png

joncage commented 2 months ago

Same issue here (chrome).

Seeing a lot of this in the dev console:

image

image

Courty40 commented 2 months ago

+1, I came here to report the same behaviour. I can get the item to work and appear but it wont remember the name or icon. tried via the UI, code looks out of place compaired to your example ?

Courty

flixlix commented 2 months ago

To help me debug this issue, can someone who has this bug, manually install the card using this file and report back what they see in the logs, when they change the configuration of one individual device.

[!NOTE] You need to have this version being logged in your browser console 0.2.0-issue#551. Otherwise you don't have the correct version installed

power-flow-card-plus.js.zip

For reference, here is what my output looks like image

Jeronimo1971 commented 2 months ago

To help me debug this issue, can someone who has this bug, manually install the card using this file and report back what they see in the logs, when they change the configuration of one individual device.

Hi, this is the error when i change (try) the name:

2024-04-15 13:58:18.397 ERROR (MainThread) [frontend.js.latest.202404042] Uncaught error from Safari 17.3.1 on Mac OS 10.15.7 TypeError: Attempted to assign to readonly property. _configChanged (/hacsfiles/power-flow-card-plus/power-flow-card-plus.js:1:175095) handleEvent (/hacsfiles/power-flow-card-plus/power-flow-card-plus.js:1:14546) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21) addValueChangedListener (src/components/ha-form/ha-form.ts:216:16) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21) addValueChangedListener (src/components/ha-form/ha-form.ts:216:16) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21

flixlix commented 2 months ago

@Jeronimo1971 thank you for the help. I tried to place a console log in the line before the error occurs, do you not get any logs in your console before the error?

Jeronimo1971 commented 2 months ago

Is it that what you want?

Scherm­afbeelding 2024-04-15 om 16 25 51

Logger: frontend.js.latest.202404042 Source: components/system_log/init.py:320 First occurred: 16:23:34 (2 occurrences) Last logged: 16:25:10

Uncaught error from Safari 17.3.1 on Mac OS 10.15.7 TypeError: Attempted to assign to readonly property. _configChanged (/hacsfiles/power-flow-card-plus/power-flow-card-plus.js:1:175095) handleEvent (/hacsfiles/power-flow-card-plus/power-flow-card-plus.js:1:14546) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21) addValueChangedListener (src/components/ha-form/ha-form.ts:216:16) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21) addValueChangedListener (src/components/ha-form/ha-form.ts:216:16) dispatchEvent ([native code]::) event (src/common/dom/fire_event.ts:76:21)

max-t-d commented 2 months ago

Adding onto this: as soon as I try to add the individual (in this case: my EV charger) via the code editor, the entire card breaks down and doesn't show up anymore... the up until the moment I type in "entity" under individual, everything is fine, as soon as I'm done with "entity:" everything disappears. fine: image gone: image this does not change, no matter whether I define an entity there or not. the visuals only return once I remove the individual entity (no additional arguments to the individual make any difference whatsoever)

flixlix commented 2 months ago

@max-t-d seems like your browser is holding on to the old version. Can you check this in the console?

flixlix commented 2 months ago

@Jeronimo1971 no, it should look like this (3 objects being printed in one line)

image

max-t-d commented 2 months ago

@max-t-d seems like your browser is holding on to the old version. Can you check this in the console?

Strange. For unrelated reason I just rebooted my HA and then proceeded to again empty cache and even opened the page in a completely naked browser install. In my case the console keeps repeating the same error (same on safari and chrome): image

flixlix commented 2 months ago

@max-t-d please send me your config. Any errors on the card? Does it show up on the dashboard?

looks like you individual config is not an array, but an object.

it probably looks like this:

individual: {}

try removing it or setting it to null.

Edit

can confirm, setting:

individual: {}

... results in the same error you showed.

psym88 commented 2 months ago

same issue here.

What i tried so far:

Keep up the good work.. im still hyped for v2.0

psym88 commented 2 months ago

To help me debug this issue, can someone who has this bug, manually install the card using this file and report back what they see in the logs, when they change the configuration of one individual device.

Note

You need to have this version being logged in your browser console 0.2.0-issue#551. Otherwise you don't have the correct version installed

power-flow-card-plus.js.zip

For reference, here is what my output looks like image

Screenshot 2024-04-15 194113 Screenshot 2024-04-15 194337

flixlix commented 2 months ago

Adding onto this: as soon as I try to add the individual (in this case: my EV charger) via the code editor, the entire card breaks down and doesn't show up anymore... the up until the moment I type in "entity" under individual, everything is fine, as soon as I'm done with "entity:" everything disappears. fine: image gone: image this does not change, no matter whether I define an entity there or not. the visuals only return once I remove the individual entity (no additional arguments to the individual make any difference whatsoever)

@max-t-d

Just noticed an error in your config.

You have it like this:

  individual:
    entity:

You need it like this:

  individual:
    - entity:
max-t-d commented 2 months ago

Adding onto this: as soon as I try to add the individual (in this case: my EV charger) via the code editor, the entire card breaks down and doesn't show up anymore... the up until the moment I type in "entity" under individual, everything is fine, as soon as I'm done with "entity:" everything disappears. fine: image gone: image this does not change, no matter whether I define an entity there or not. the visuals only return once I remove the individual entity (no additional arguments to the individual make any difference whatsoever)

@max-t-d

Just noticed an error in your config.

You have it like this:

  individual:
    entity:

You need it like this:

  individual:
    - entity:

Oh wow… I must’ve been blind 🤦‍♂️ sorry about that and thank you so much for being this eagle eyed!

flixlix commented 2 months ago

Please try this fix I've implemented.

Issue should be fixed now.

[!NOTE] You need to have this version being logged in your browser console 0.2.0-issue551. Otherwise you don't have the correct version installed

power-flow-card-plus.js.zip

psym88 commented 2 months ago

Please try this fix I've implemented.

Issue should be fixed now.

Note

You need to have this version being logged in your browser console 0.2.0-issue551. Otherwise you don't have the correct version installed

power-flow-card-plus.js.zip

danke dir vielmals! quick tests shows it's fixed for me

AminShAT commented 2 months ago

I can't replicate this issue

Screen.Recording.2024-04-14.at.17.35.41.mov

Strange, works perfect in the "code editor" when i change something... but nothings works in the "visual editor"?

Removed the card, reinstalled it... but the same strange thing with the visual editor?

Same here

flixlix commented 2 months ago

🥳

Fixed in https://github.com/flixlix/power-flow-card-plus/releases/tag/v0.2.1

Timer2000 commented 2 months ago

Now with 0.2.1 all is perfect.

Thank you very much for your fast fix