Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added option to sort individual devices by power usage and have… #700

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SveLil
Copy link

@SveLil SveLil commented Sep 17, 2024

this will allow the configuration of more than 4 devices and the sorting of devices by power usage. If more than 4 devices are configured and sorting is enabled, only the top 4 are shown.
Fixed #578 #680 #602

@MrBearPresident
Copy link

@SveLil Do you have the power-flow-card-plus.js so I can test it?

@SveLil
Copy link
Author

SveLil commented Sep 30, 2024

power-flow-card-plus.js.txt
Attached as txt file as github doesn't support Javscript attachements

@MrBearPresident
Copy link

@flixlix I can confirm it works.

@adamlc
Copy link

adamlc commented Oct 1, 2024

This would be great! I never need to show more than 4 devices at once, as I only have high power devices defined and don't have them all on at once.

@TheSmartGerman
Copy link

@flixlix any plans to merge & release this feature?

@vbarrier
Copy link

Great pull request & feature can't wait to use it!

@dotlolz
Copy link

dotlolz commented Dec 21, 2024

Hi
Tried the PR but I can't show more than 4 individuals, even if more are configured. How does it work ?
Thx

@vbarrier
Copy link

Hi Tried the PR but I can't show more than 4 individuals, even if more are configured. How does it work ? Thx

The goal is to display the 4 most consumers not all.

@mascheihei
Copy link

@SveLil : First of all thanks! Great extension. However I've run some tests on my non-productive system and maybe found a bug

I've made 5 template sensors (device class: power / state class: measurements / power 1 - power 5, with fixed values 50W, 40W .. 10W), sort enabled, and depending on the order in the configuration the number of displayed items changes. Please see attached the two different situations. I'm not sure if this is just on my system.
Bildschirmfoto 2024-12-27 um 12 49 14
Bildschirmfoto 2024-12-27 um 12 49 31

@mascheihei
Copy link

mascheihei commented Dec 29, 2024

Some additional comment:
I believe the sort function is ok. looks pretty standard.
It is only about the TopRight and the BottomRight bubble. If the TopRight or the BottomRight bubble (after sorting) is the entity configured on position one, this entity will not be displayed.
A workaround would be to configure a template sensor with "zero" and set this entity on position one in the configuration.

@TheSmartGerman
Copy link

@mascheihei
how did you install the feature request? sry, not that familiar to GitHub / HACS.

@mascheihei
Copy link

@TheSmartGerman : Well I'm not a expert too:

However let me explain my steps:
1st: E.g. with the file editor in HA go to the www/community/power-flow-card-plus
2nd: There are two files: power-flow-card-plus.js and power-flow-card-plus.js.gz
Delete both
3rd: Download the file from SveLil (30. September). remove the .txt extension
4th Upload the file in the directory where you have deleted the two files
5th Delete the cache in your browser (normally the javascripts are cached (or use a differen browser

enjoy, you can now configure more than 4 sources in the UI-Editor

@TheSmartGerman
Copy link

@TheSmartGerman : Well I'm not a expert too:

However let me explain my steps: 1st: E.g. with the file editor in HA go to the www/community/power-flow-card-plus 2nd: There are two files: power-flow-card-plus.js and power-flow-card-plus.js.gz Delete both 3rd: Download the file from SveLil (30. September). remove the .txt extension 4th Upload the file in the directory where you have deleted the two files 5th Delete the cache in your browser (normally the javascripts are cached (or use a differen browser

enjoy, you can now configure more than 4 sources in the UI-Editor

thx. I was missing the js file. didn't saw the file above. works great for me. just added 12 individuals. very nice!

@SveLil
Copy link
Author

SveLil commented Jan 12, 2025

@mascheihei I will look into it, currently swamped with work

@tungmeister
Copy link

@SveLil with sorting enabled the item color doesn't work correctly either, it seems as though the color is fixed to the location within the card rather than the item.

@TheSmartGerman
Copy link

@SveLil with sorting enabled the item color doesn't work correctly either, it seems as though the color is fixed to the location within the card rather than the item.

would it be possible, to add a option, to ignore loads below a certain power e.g. 50W

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] more than 4 individual cards to be configured but only 4 shown
8 participants