WTH!? - Why can't we see electricity cost for individual entities in Energy dashboard?

I think that that statement is incorrect. It is definitely possible to implement this correctly, it is just not easy.

I’m starting to see the complexity and the need for solutions not only per country basis, but possibly per contract basis… This is a bucket load of exceptions and different rules to achieve excellence.

While I really appreciate the intention to bring a great solution in to light, it’s also frustrating but to have a basic version of it implemented in an easier way to enable e.g. consumption budgets…

Built-in calculated entity/helper, for entries exposing a “W” measure?

1 Like

That already exists.

1 Like

This together with Utility meter works fine but is a big task to setup and there is no nice dashboard. It is quite simple to show last period (hour, day, week, month) usage using some existing card but almost impossible to create a dashboard that is similar with energy dashboard. I use apexcharts-card for that but for only one device per card is really usable.

From UI perspective it would be nice just to have a toggle between “energy” and “cost” in Energy dashboard.

For example, right now I look at my peaks in the dashboard but actually the cost of these peaks is nothing compared to lower usage thanks to my automation but there is no good way to visualize that (especially per device)

Price per hour

Of course it would be also very informative to see for every hour what appliance took how much energy. instead of daily totals. Sometimes there are still bugs in my automation or other cases that can be optimized even further. Energy dashboard could help here a lot.

Can this not be automated with a tickbox when adding entities to the energy dash?
Using the Reimann integration isn’t a straight forward process for non-techies (like me) “just wanting costs to be calculated” per individual entity.

I expected: “Energy cost helper” where input is: Grind price and energy entity (whether it is kWh or W)

The energy dash settings could have:
e.g.: “Do you want to create a cost calculation entity based on your grids energy price?”

Or would you prefer this to be added to the integrations side where one define the energy price in some general settings page and integrations automatically add a calculated cost entity?

If one goes the integrations path, it’s “cleaner” from the energy dash pov. However it’ll be on one’s own responsibility to graph/keep track of costs per device while still making it possible to “budget” consumption.

I guess what I want here is the ability to assign costs to individual devices which are using power monitoring plugs. At the moment, I can add the power monitor to the Energy dashboard, and it tells me the watts, but I’d like to see at the end of the day, how much it cost to run my washing machine, for example. I’m aware that there may be a way to do this with templates, but I find that that’d beyond my current skill level!

1 Like

Remember perfect is the enemy of good! Many of us particularly in cloudy northern regions don’t have grid tie solar.

1 Like

Yes! This the most crucial theme we are facing.

Batteries being the future, and as you said Use own energy first as a rule of thumb, this would be the main strategy to elaborate on imho.
We will never be able to calculate the price exactly for all pricing policies spread over the world.
We will however be able to create these more generic strategies on when to power over the grid, and when to power from your own batteries.

I’d hope you could share your thoughts on that, maybe even in a pinned and dedicated topic. What were you able to do already.

We should focus on the required Paradigm Shift instead of trying to be exact in calculating the kWh price for that single light.

Ha wouldn’t be HA, if we wouldn’t try and list the devices that already enable us to make that shift. Even on a smaller scale. List battery powered devices that actually work and integrate them in HA.

Example: I have a Hue Go, which is a battery powered, yet integrated Hue light. Ambient, so it won’t light a room on its own. Looking for other LED battery powered lights, I failed to find a single one…That can’t be true.

We dont immediately need that Greenrock Home battery to be able to act now. Stop thinking in peak and low tariffs, start the shift to Own Production First.

For our Dutch readers see this vid on E O E (Eigen Opbrengst Eerst = Own Production First )

This is already going too far from the original WTH. What I’d like to say is that let every user to decide how complex they’d like to go with price calculation and keep support for simple constant tariff but also complex template based price sensors like it is right now. We already have all this for grid sensors but miss for individual devices.

“Own production first” sounds great but in energy is too egoistic IMHO for on-grid setup and in reality is not always the best strategy neither for the consumer nor the overall network.

For example, when night price is low but daytime is high due shortage in the grid, it is better if you sell all your solar excess power instead charging batteries and switching yourself off the grid during the night.

There are a lot of details in it of course. There are startups who try to solve such problems and more will come most probably. One user can’t affect the big picture a much but many already might. Still, one user maybe could save its own bill.

2 Likes

Here is my method which I think could cover a large portion of the HA use cases and could be coded into the energy dashboard.

For grid consumption the cost is based off my import price:

Screenshot 2022-10-07 13.52.46

My energy price changes every minute, so i multiply the energy price by the the current power being drawn from the grid, so based on my current cost, the nominal 1000W load costs $0.17 to run for 1 hour, which can be calculated using the Rienmann Sum integral.

Making things a little more complex if I am running off battery or solar. I attribute the cost to the value I could have achieved if I exported my solar or battery at that point in time.

Screenshot 2022-10-07 13.52.53

I have sensors that report the power being delivered to the house by solar or battery and multiply that by my current feed in price. So in this case the nominal 1000W load costs $0.08 to run for one hour, which again can be calculated by Rienmann Sum integration.

Now into the more complex case, what happens when I am running off solar, battery and grid at the same time.

Screenshot 2022-10-07 13.52.40

I just combine the entites above.

In total the house is consuming 12,073W (which is 1,736W from grid, 5010W from battery and 5343 W from solar), which is costing me $0.3/hr for grid and $0.83/hr for battery+solar for a total of $1.13/ hr. Divide by the house consumption of 12,073W gives me a house consumption cost of $0.09/ kWh. So the nominal 1000W load will cost $0.09 to run for one hour, but can be more accurately calculated using Rienmann Sum.

Sensor definitions below:

    - name: house_consumption_grid_cost_rate
      unit_of_measurement: $/hr
      state: "{{(states('sensor.amber_general_price')|float(0) * 
                 states('sensor.apf_grid2house')|float(0) /1000)|round(2)}}"
    - name: house_consumption_feed_in_cost_rate
      unit_of_measurement: $/hr
      state: "{{(states('sensor.amber_feed_in_price')|float(0) * 
                (states('sensor.apf_batt2house')|float(0) 
               + states('sensor.apf_solar2house')|float(0)) /1000)|round(2)}}"
    - name: house_consumption_cost_rate
      unit_of_measurement: $/hr
      state: "{{(states('sensor.house_consumption_grid_cost_rate')|float(0) + 
                 states('sensor.house_consumption_feed_in_cost_rate')|float(0))|round(2)}}"
    - name: house_consumption_cost
      unit_of_measurement: $/kWh
      state: "{{(states('sensor.house_consumption_cost_rate')|float(0) / 
                 states('sensor.apf_house_entity')|float(0)*1000)|round(2)}}"
3 Likes

I would say keep it simple stupid. A valid use case scenario would be “what does device X cost me on a yearly basis” (IE: The washing machine or tumble dryer). Asking that question doesn’t need to include Solar Power. I only want to know what the usage is and calculate that with a price of kw/h.

I see your point, and I think this is a case of the great vs the good. But aren’t you conflating two (or more) different questions:

  1. What is the usage of this device “costing” (in terms people can more easily relate to: cost vs. kWh)?
  2. What portion of my actual out-of-pocket energy costs are attributable to this device?

If I want to evaluate a device’s consumption, for example to determine how often to use it, or whether to upgrade to a more efficient unit, I want to know its consumption. While kWh is what might be most appropriate, many people can’t related to that as easily as they could if doing the unit conversion to cost of those kWh – my device is using the equivalent of $X/day, if I can cut that by 25%, a new unit will pay for itself in 2 years.

Same question, WTH can’t I see the value of the energy my solar system is producing instead of just kWh?

And WTH if I don’t have real time energy consumption monitoring can I see any costs/kWh from the energy dashboard?

Also, it is a bit false to think of the energy from solar as “free”. While you might not be paying the utility for that energy, the value of the energy it is producing is contributing to the ROI on the system to pay it off. If I’m not using the energy, because of net metering, it is getting banked by the utility company to defer the cost of my future energy consumption.

Thanks to this hack from @lundmilo, you can enter each of your appliances energy sensors on the gas consumption section of the energy dashboard. If you delete the phase ‘gas consumption’ and call it ‘appliance consumption’ in your mind it works.

Using my solar, battery, grid average cost sensor (above) accurately tracks to cost of each appliance depending on which energy source was used at which time. :slight_smile: Fridge and Dishwasher both consumed the same amount of energy (1.6 kWh), but the fridge runs overnight ($0.26) and the dishwasher was run during solar production ($0.17).

5 Likes

I’m really liking the insights configuring appliances on (gas) consumption source is providing.

I see consumption of individual appliances on an hourly basis:

2 Likes

yes, really cool I like it as well!!


And to be honest, more and more people are using it like this in my surroundings. Hopefully it would be picked up by the devs, to add a seperate section for this instead of “misusing” the Gas part.

Best tip I got this year!

5 Likes

I absolutely love this. It looks great. Biggest problem for me is that I’m using the gas as intended.

2 Likes

Just create a seperate overview with longterm statistics card and energy card…Energy Cards - Home Assistant

is this a hack, as in hacking the frontend code, or merely a hack, as entering electric devices in the gas section…?

If the latter, how does this not mess-up the true gas statistics/graphs/cost calculation? I dont want my 0 for gas to be replaced by any other electric device :wink:

Love this!


Hopefully this will be part of the Energy Dashboard (at the right place) one day, the only thing which is really missing (from my perspective).

3 Likes

This is a heck because people would like to see this level of detail for their appliances, possibly by updating or as an option on the existing energy dashboard monitor individual devices card. This is a heck because the data is already available in HA, it is isn’t visualised by default.

This is a hack, using the (gas) consumption card, as it is using the existing front-end as a temporary workaround by (mis) configuring some sensors (no coding changes required) to achieve the desired outcome but with some downsides. If you are tracking gas it mucks up the results, if you aren’t tracking gas the hack shows appliance electrical consumption as gas consumption which can be confusing and the daily $/€ totals are duplicated.

2 Likes