reptilex / tesla-style-solar-power-card

Home assistant power card mimicking the one tesla provides for the powerwall app.
211 stars 59 forks source link

Use Home Assistant Energy design #86

Closed LucaDiba closed 2 years ago

LucaDiba commented 2 years ago

Hello, as you probably already know, Home Assistant has just added the energy management section. They have a design which is extremely similar to yours but, in my opinion, it's also a little bit better.

image

I think the most important change is that the lines do not start and end at the center of the circle, but there is a lot of space between them, and it is much easier to understand where the flow comes from and where it goes, especially when it is slow.

Take, for instance, the image below (it's edited to create the situation I want to describe so there are no numbers): image I'm not able to tell where the orange flow goes it reaches the splitting part. I know that I could look at the numbers, but it's much easier to just look at the image.

I'm not sure if it would be easy to do, but if you could just copy and paste the template of Home Assistant I think it would be better also considering that it would be unified with the official design.

mrgadget commented 2 years ago

Like this? Ignoring icons as I've changed them to suit my purposes. image I have just submitted a PR for another issue here and saw your issue so made the change in my fork. If @reptilex sees this as the way they want to go I'm happy to submit as a PR.

@reptilex - your call.

reptilex commented 2 years ago

I'm still thinking whether I like this better ...

Kh3nsu commented 2 years ago

Well I think you could add an option for this. I switched to mrgadgets PR and I like it 10 Times more. It just looks cleaner

mrgadget commented 2 years ago

You make a good point - I use a variable in there "gap". Could this be made a configuration parameter and default to 0? Means if you want a gap, you set it 20 or something (gap in pixels).

reptilex commented 2 years ago

Hey, if we can have that variable to have the gap or not on the configuration I would love to have the PR. And if it is too much work, I can add it. Send the PR anyway. I found a bit of time now for it. Sorry for the late decision ;)

poldim commented 2 years ago

The mixing of power and energy on the HA energy dashboard bothers me. The bar chart on the left is fine, but IMO, their use of the dots is incorrect as they are displaying energy used rather than power in the instant you're looking at the dashboard. And energy doesn't flow in an instant, it's the cumulative summation of usage over time.

This would then align with how Tesla does their display, dots based on power flow, not energy. image

mdoliver commented 2 years ago

Does anyone know of a card like this that just shows power flow? I love this card but don't want it to show energy sums, just the power flow (apologies if I've missed something here)

reptilex commented 2 years ago

The mixing of power and energy on the HA energy dashboard bothers me. The bar chart on the left is fine, but IMO, their use of the dots is incorrect as they are displaying energy used rather than power in the instant you're looking at the dashboard. And energy doesn't flow in an instant, it's the cumulative summation of usage over time.

This would then align with how Tesla does their display, dots based on power flow, not energy.

I concur, in fact the reason why I'm not even using it is because I don't see the point on having energy shown for that. I really don't even grasp the whole concept. The card I built is agnostic. It shows flows you define. Energy can be shown here, in fact they used part of my code to create their energy dashboard and requested a change in my license to be able to do so.

reptilex commented 2 years ago

Does anyone know of a card like this that just shows power flow? I love this card but don't want it to show energy sums, just the power flow (apologies if I've missed something here)

The sums of energy can be shown but don't need to. As I understand it my card works with flows not with energy. But it depends on what you feed since like I said it is agnostic to what you place in.

mdoliver commented 2 years ago

Does anyone know of a card like this that just shows power flow? I love this card but don't want it to show energy sums, just the power flow (apologies if I've missed something here)

The sums of energy can be shown but don't need to. As I understand it my card works with flows not with energy. But it depends on what you feed since like I said it is agnostic to what you place in.

Thanks reptilex. I'm obviously missing something then :(. I've done a bit more playing but I cannot get the grid_entity to recognize any sensor. Instead what happens is any value stored in grid_entity gets added to the solar_generation entity and is represented as a sum for solar generation instead.

mdoliver commented 2 years ago

I also have the appliance1_consumption_entity in use. Any value that appliance 1 is populated with gets subtracted from the solar_generation entity. Apologies if I'm not making sense. I might also be posting in the wrong area now.

poldim commented 2 years ago

I also have the appliance1_consumption_entity in use. Any value that appliance 1 is populated with gets subtracted from the solar_generation entity. Apologies if I'm not making sense. I might also be posting in the wrong area now.

Yes, you're off-topic. But to answer your question, I don't think the stuff inside the circle can be turned off. You said energy but I'm assuming you meant power.

poldim commented 2 years ago

The mixing of power and energy on the HA energy dashboard bothers me. The bar chart on the left is fine, but IMO, their use of the dots is incorrect as they are displaying energy used rather than power in the instant you're looking at the dashboard. And energy doesn't flow in an instant, it's the cumulative summation of usage over time. This would then align with how Tesla does their display, dots based on power flow, not energy.

I concur, in fact the reason why I'm not even using it is because I don't see the point on having energy shown for that. I really don't even grasp the whole concept. The card I built is agnostic. It shows flows you define. Energy can be shown here, in fact they used part of my code to create their energy dashboard and requested a change in my license to be able to do so.

IMO, it would be better to have the left chart of the energy dashboard be as it is, energy, with some overall statistics. And the right side show power and power flows. They're confusing the flows while showing energy which is the problem.

reptilex commented 2 years ago

Now you can add gaps as you wished, they are now a configuration setting: show_gaps: true take a look into the documentation, just pushed it with the newest release.

pohly commented 8 months ago

For anyone who (like me) finds this feature through this issue instead of the fine documentation: the config field is show_gap: true, not show_gaps: true :sweat_smile: