gurbyz / power-wheel-card

An intuitive way to represent the power and energy that your home is consuming or producing. (A custom card for the Lovelace UI of Home Assistant.)
Apache License 2.0
164 stars 22 forks source link

Solar Money Calculations #59

Open jaysbeekay opened 4 years ago

jaysbeekay commented 4 years ago

In relation to the money view, it would be useful to calculate to be able to subtract the amount of money (through both utilising solar power produced and selling it back to the grid) from the total of cost of power provided by the grid.

This way you will be able to effectively see how much cost:

  1. Through selling power back to the grid
  2. Through utilising solar power
  3. Through purchasing power from the grid

Today the card simply adds the cost of solar power and grid power to provide a total cost. Thanks

gurbyz commented 4 years ago

I'm not sure I understand your feature request. Do you want an extra view? Or do you want to change the values in the current money view?

Let's say your money view has this values:

      5
   2      3
6     8      11

What values would you want to see?

jaysbeekay commented 4 years ago

So where you have 11, that should be 5 (8-3, not 8+ 3) because you shouldnt sum the money from the power produced by the solar panels to the power you are buying form the grid.

I am also assuming that the 6 is calculated by subtracting 2 from 8? Because you are effectively getting a credit of 2 for the solar power that you have sold back to the grid which should be substracted from the grid power cost.

gurbyz commented 4 years ago

The value of the home icon should be the sum of the part from the solar power that's consumed by the home (=3) and the part of the nett grid export/import that is consumed by the home (=8). Makes 11. This is also supported by the way the arrows are positioned.

Your second assumption is about right. In fact it's 2 - 8 makes -6, but I left the minus out (and reversed the color of the grid icon in the view to show it's in 'importing-from-the-grid state').

Maybe to add for understanding what's going on: the 5, 2 and 8 are directly connected to an entity in Home Assistant. The rest is calculated.

Edit: in words what the home icon value also represents: the amount of money you have to spend if you didn't have solar panels. And that's calculated by applying the rate to the amount of energy that the home consumed (see energy view). (Which is in fact not correctly calculated if you have different import/export rates).

jaysbeekay commented 4 years ago

The value of the home icon should be the sum of the part from the solar power that's consumed by the home (=3) and the part of the nett grid export/import that is consumed by the home (=8). Makes 11. This is also supported by the way the arrows are positioned.

Correct, except only for the Power view - Money view should be calculated based on the 8-5 to give you $3. THis will allow you to see hw much money you are saving by using Solar power

Edit: in words what the home icon value also represents: the amount of money you have to spend if you didn't have solar panels. And that's calculated by applying the rate to the amount of energy that the home consumed (see energy view). (Which is in fact not correctly calculated if you have different import/export rates).

Yes, although I think it would be more useful to actually show how much your electricity is costing taking into account your solar, so 8-5 to give you $3