Can I get some help configuring my Energy dashboard?

I have a few TP-Link EP25P4 at home and I would like to take advantage of the energy usage they report to track my expenses somehow. I read the docs but I am not an expert and is kind of hard for me to understand what to do or where to go. This is what my electric bill looks like:


But from there I am not sure what values to add for the USD/kWh in the below card or how to calculate such value:

Any help will be really appreciated!!!

What I think to read is that the first 1000kWh come at a slightly lower price.
i.e. the bill should be 1000x0.04989 + 476x0.05214 + 1476 x 0.055 = 110.98 USD
Question is if you want to be exact on the costs?
Option 1: take a ‘reasonable’ stab: 110.98 / 1476 = 0.07519
Option 2: make your live less easy and create a sensor that provides the price based on total consumption so-far

Can you provide me with an example for Option 2? I believe is the most suitable as you said!

BTW I seem to have all these sensors available :thinking:

I was reading here but not sure I am going the right path and not sure also how to use sensors for those calculations since the current values will come from there

I did not say this was most suitable… and not sure what value it brings but anyhow :slight_smile:
The first thing you need to do is to know (!) what your total usage is for the period as this will not come from the individual plugs
Then

template:
  - sensor: 
    - name: "ElecPrice"
      unit_of_measurement: "$"
      state: >
		{% if states('sensor.your_sensor_showing_total_usage_this_period') | float(0) < 1000 %} 
			0.10489
		{% else %}
			0.10714
		{% endif %}

you do see that the difference is very (small) between >1k and below

1 Like

Where did you get the values 0.10489 and 0.10714 from? These are the sensors coming from the smart plug:

  • sensor.smart_plug_light_current_consumption: this is the current consumption with devices powered on/off and so on
  • sensor.smart_plug_light_total_consumption: this is the monthly consumption as of today, of the value isn’t accurate, since I just installed those yesterday and of course, the current bill period has started already. I will turn it off till the next period start to get accurate values but would like to get everything set up in advance

Along you bill
it states 0.04989 below 1k and 0.05214 above
added 0.055 to both as this is the fuel adjustment.
I am guessing loudly here… YOU should know in fact :slight_smile:
Usually smart plugs do not provide the total (!) consumption of your household, this total is used to calculate the price ranges

1 Like

Yea, you’re right they only offer such information whenever is used however, I have a UPS, and the Tv, Xbox Console, Nintendo Switch, Soundbar, and even the Internet modem are connected to it so the information coming from the plug belong to all of them the only thing I am not measuring at the moment is the fan and light but I have a different idea for that.

As long as you donot have the total-household consumption then my proposal will not work
BTW, my inital calc seems to be off, total is 155 bringing the average to 0.1056
Unless you have exact figures to base on, no point in making the price sensor exact…appels/pears issue. so I would just go with a fixed price with that average

I was able to configure the AMR2MQTT AddOn, and now I am getting the total consumption it is read from sensor.energy_meter_consumption if I am not mistaken your sensor example just tells what value should be used to do the math but not doing the math at the end, am I right?

Indeed, it is providing the price based on the params you set. In this case as long as your total stays below 1000 the price will be 0.10489. This way the price changes as soon as you reach the threshold and is not used for all consumption

And what card can I use to display the cost based on total consumption? :thinking:

The energy dashboard does this where you can add the enrgy sensor and then it asks for the price input
If you want to do without the energy dash then you’d need to create a sensor that uses both energy and price sensor…or use the price logic in a sensor with input of the energy sensor.

1 Like

you’re correct, I can use your sensor example in there however I will be missing some part of the math and there is where my confusion is right now, you said before:

it states 0.04989 below 1k and 0.05214 above
added 0.055 to both as this is the fuel adjustment.

the sensor will only care about the first part on the above statement:

template:
  - sensor: 
    - name: "ElecPrice"
      unit_of_measurement: "$"
      state: >
		{% if states('sensor.your_sensor_showing_total_usage_this_period') | float(0) < 1000 %} 
			0.10489
		{% else %}
			0.10714
		{% endif %}

q: where do I add the extra 0.055 to both as this is the fuel adjustment?

I am not redoing the math as on the road but I thought to have already embedded this in the sensor…cannot remember anymore
Anyway, these are YOUR prices/values, not mine so you’d have to make sure they stick :slight_smile: