Thx for your extensive response. Yes, now the images do reflect the current design. I found some hours this evening to dive into possible performance improvements. Found something in lit-element about the shouldUpdate() function that could help.
What’s happening? HA gives each custom card a large hass property. Cards check this hass object for changes in entities. By default HA and Lit-element cards are designed to update each visible card on every change of every entity (= automations, sensors, scripts, etc, etc). For large HA setups with many entities this can become a problem if you combine it with one or more of the heavier kind of cards.
I made a change to the power-wheel-card to update the card only on specific entity changes (e.g. all the input sensors). That should skip a lot of unnecessary updates and should free some browser resources. There’s a version 0.0.9-dev available on the dev branch in the repo if you want to give it a try.
But since HA updates the visible cards only, you could also/first try to temporarily isolate each heavier kind of card on a separate view in Lovelace to test things. This approach could help to pinpoint the performance problems to a specific card.
I hope the dev-release and the test approach can in the end solve some of your performance problems, if not all.
the missing 0 under the sun icon is a bit too clean for me… In fact, it gives an uncertain feeling as the sensor isn’t picking up alright. I’d prefer it if no solar production is available to have it show 0 under the icon.
secondly, what would really be nice is if the title of the card were to change along with the view, and show, Power- Watt, Usage/Energy -kWh and Cost (which sound better than Money iyam) instead of the Power Distribution or whatever fixed title we give it, it is showing now.
thanks for trying to make it better, ill report if anything arises, good or bad…
UPDATE
after having taken out the mini-graph-card and letting it run for more than a day, I can report most of the performance issues have disappeared. (loading the page still takes out the Hue lights…) Apparently the combination of the 2 cards causes trouble. Not sure how and what to ask to check what could be the cause for this, but please let me tag @kalkih here to have a look? fyi, I am using HA 084.3.
Have taken your two suggestions into account already. And I’m following your discussion on performance in the mini-graph-card topic with great interest.
cool. Though I have stopped using that for the cards I had, too much burden on the system. Your power-wheel seems to be much easier on the system lately so that’s fine too
got a question - I have an Enphase system using an Envoy-S, which provides grid consumption and array production data - is anyone using this card with an Envoy, if so how are you calculating grid export?
Hi @DrewXT, I saw you’re getting support already in another topic by @exxamalte . Super! I understand the naming of the card parameters can be confusing. I will add some more explanation to it in next release. (I want to postpone changing the parameter names itself for a while since that would cause a breaking change and people are still recovering from the last breaking change. ).
testing the new card, and the added options seem to work as promised
trying to use the coloring options, I am a bit puzzled though if what I want is already possible.
First: am I correct the icons don’t color along the customizations set for the individual entities in the HA setup?
If the above is true, how could I
have the solar icon turn yellow when >0 (producing) or else grey;
have the grid icon turn green when returning to the grid, and red when consuming
have the home icon turn green when using only solar energy, orange when using a mix, red when using only grid energy…
lastly I would think it better to have the grid icon to the house turn red when consuming (vs the yellow for the solar energy color arrows which are yellow when producing)
right now we have 2 options, and they go for all icons I think, which could be made more insightful.
if not yet available, please consider this a feature request
Set a different title per view by using optional card parameters title_power, title_energy and/or title_money.
All three card parameters default to the value of card parameter title.
Auto-toggle between views. Click the recycle icon to turn on and off the auto-toggle.
The initial auto-toggle state can be set by optional card parameter initial_auto_toggle_view.
The period between views can be set by optional card parameter auto_toggle_view_period (in seconds).
Improvements
Performance. Update only on specific changes of the hass object.
Don’t suppress zero values on solar, home and grid icon; only on arrows.
More explanation in the readme about which sensor to use for what card parameter.
(No support for backwards counting energy sensors yet. Have to work on that a bit more.)
Power-wheel-card is still in beta. You can expect breaking changes in future releases.
You have very specific icon coloring requests. Power-wheel-card does support a few out of the box. Let’s explain them for other users first, before diving into your request:
You can choose to not color the 3 icons at all. Use color_icons: false which is default.
You can choose to color them automatically. Producing icons will turn green. Consuming icons will turn yellow. Use color_icons: true.
You can choose to have your own colors for producing and consuming. Use consuming_color: and producing_color: for that.
You can set a theme in HA and the power-wheel-card will use --label-badge-yellow of the theme for the yellow color, etc. automatically.
Your coloring requests go beyond these out of the box features and are not supported.
However since some users (you for instance ) are able to add a color to the sensor itself, I will take the feature request as “let custom colors of the input sensors override the colors in the power-wheel-card”. Like it does for icons already. In that way advanced users can color the icons dynamically very specifically. Can you give an example of how the entity attributes will look like if there is a custom color dynamically set by some other component? (B.t.w. I won’t work on this feature immediately, because there are a couple of other features to go first.)
(different numbers caused by real time updating, energy flow sensors not colored in customize yet )
would be really nice if we could set these customizations, but for the Home icon bottom right, that would not be possible would it, since the card calculates that?
Home icon is same as my (sh)own sensor.levering_of_verbruik, but that isn’t used in the config entities…
you might think I have a specific colorizing request, but I feel when you give it some thought it is very useful one. Having a default setting for all of the entities simply doesn’t do the card justice, and tacks back from its purpose
Almost but not quite. Because now you want to use exactly the same value_template for both sensors. But I like the idea. You could use a min in the latter, but don’t forget to abs in the end then.
why? the sensor.netto_verbruik shows the positive usage when consuming, and a negative value when returning.
using an |abs on a positive value does nothing, and on the negative makes it positive, as is required by the card.
but i see I have to add a condition, otherwise there’s always the same value for both… pfff, thought I had it…;-((
Hi @VDRainer . Could be done if the feature request mentioned here would be implemented. But then you still have to (learn how to) dynamically customize colors on the sensors itself. I have no experience in that, but others have.