In some places, the energy bill have a “fixed cost” that not depend of energy usage.
Adding a new “cost row” not associate to any energy meter can be useful to get a more real cost.
I emulate this using a dummy sensor with 0 fixed value and total cost entity (Potencia y cuota)
It works fine, but is very “ugly” show 0kwh.
Adding a new option “others cost” option and adding them before the total could be more clean.
Example mockup:
Great!! In Australia it’s the same
I agree, here in South Africa we have a connection cost aswell as the usage cost
drthanwho
(Thanasis)
September 30, 2022, 12:55pm
4
That would be a nice addition indeed. In some places the costs are based on the amount of kWh used so would be nice to account for that too.
tom_l
September 30, 2022, 1:09pm
5
So a fixed cost that is not fixed?
Kind of like the option we have now (“use an entity”), but added daily?
drthanwho
(Thanasis)
September 30, 2022, 1:59pm
6
Hmm perhaps I should make a new post for this
I never tried with an entity before. Would be an interesting template given there are 5 different costs added based on kWh consumed. Stupid greek system
tom_l
September 30, 2022, 2:03pm
7
Well it wouldn’t work at the moment because the “use an entity” is cost per kWh or total cost, not a per day cost.
Using a “total costs” entity and templates sensor maybe you can get calculate the cost.
In Spain, with solar panels, we have “hourly balance”, so, I need calculate the balance between export and import kwh from the grid for calculate the cost of the hour.
- sensor:
- name: "Balance neto horario"
unique_id: "Balance neto horario"
unit_of_measurement: "kWh"
state: "{{ ((states('sensor.grid_exported') | float(0) - states('sensor.exportado_ultima_hora') | float(0)) - (states('sensor.grid_consumption') | float(0) - states('sensor.importado_ultima_hora') | float(0))) | round(2) }}"
- trigger:
- platform: time_pattern
minutes: 59
seconds: 59
sensor:
- name: "Consumo Total"
unique_id: consumo_total
state: "{{ states('sensor.consumo_total') | float(0) + max( -(states('sensor.balance_neto_horario') | float(0)) * states('sensor.esios_pvpc') | float(0), 0 ) }}"
unit_of_measurement: "€"
state_class: total_increasing
- name: "Devuelto Total"
unique_id: devuelto_total
state: "{{ states('sensor.devuelto_total') | float(0) + max( (states('sensor.balance_neto_horario') | float(0)) * states('sensor.esios_grid_injection_price') | float(0), 0 ) }}"
unit_of_measurement: "€"
state_class: total_increasing
In short:
balance = imported - exported
if (balance > 0)
totalToPay += balance * costImport
else
totalToReturn += -balance * costExport
drthanwho
(Thanasis)
September 30, 2022, 2:17pm
9
Maybe it would though cos it’s a cost per the total kWh. not per day.
e.g.
25kVAx118/365x0,130€/kVA)+(1317kWhx0,00560€/kWh)
25kVAx118/365x0,520€/kVA)+(1317kWhx0,02130€/kWh)
1317kWh x 0,00690€/kWh)
640kWh x 0,00690€/kWh)
1957kWhx0,01700€/kWh
1295kWhx0,00007€/kWh
629kWhx0,00007€/kWh
I would just need to template in the day/nigh consumed energy and should count up no?
tom_l
September 30, 2022, 2:27pm
10
Absolutely. You can do that.
HarvsG
October 1, 2022, 10:49am
11
Same, UK has a ‘standing charge’ per day on top of usage.
2 Likes
Wraiyth
(Matt Stafford)
October 2, 2022, 8:02am
12
+1 to this. I’m in Australia and this daily standing charge is common, it would be amazing to be able to easily just add it.
danmed
(Dan Medhurst)
October 6, 2022, 1:11pm
13
Vote here… UK standing charges are a thing… Just a fixed cost in pence per day.
1 Like
giqcass
October 13, 2022, 4:16am
14
For gas I have three cost variables.
Rate per Ccf (I have to convert to ft³ see post below)
Daily Customer Charge
Tax
For electricity we have a strange billing option which I’m sort of stuck using. They charge certain rates up to a threshold usage. Then after that they charge additional costs. Sadly Home Assistant doesn’t allow either. It also doesn’t allow me to change the billing period. I can’t get any entities from the Energy Dashboard or I could template a solution myself outside the dashboard.
I put together a few sensors to grab prices for Michigan Gas Utilities. It will scrape the site once per day for updates. MI Gas uses Ccf but HA does not currently support that so the price is converted to USD/ft³ in the first example. The second example gives the Ccf price that you would see on your bill if you combine volumetric charges. There is also a daily customer charge scraped in the third example. The bill will also include tax which is not represented here but you can find on your…
You can emulate using template sensor and return a value depending of actual consumption.
template:
- sensor:
- name: "Energy aditional cost"
unique_id: energy_aditional
state: "{{ states('sensor.grid_consumption_period') | float(0) > threshold ? X else Y }}"
unit_of_measurement: "kWh"
state_class: total_increasing
1 Like
giqcass
October 13, 2022, 4:47am
16
I don’t have sensor.grid_consumption_period and the Energy panel does not expose anything similar. I would have to recreate some functions of the Energy Panel to make that work.
Is a example name. You need create a sensor of you consuption of period. You can use utily meter and you energy meter to create it.
1 Like
giqcass
October 13, 2022, 10:44pm
18
That’s what I meant by the following statement.
When programming you try to never duplicate functions like that. This would be much simpler if the Energy panel exposed entities.
Yoriel
December 3, 2022, 2:33am
19
MiguelAngelLV:
sensor.grid_consumption
Hello Miguel Ángel,
What exactly does ‘sensor.grid_consumption’ and ‘sensor.grid_exported’ mean?
Right now in kW, monthly, daily, yearly, total since the beginning of time…
There are the sensors of my Solars Panels. Consumption is the kwh from grid to the house and export house to grid.