Energy fixed costs

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:

image

Great!! In Australia it’s the same

I agree, here in South Africa we have a connection cost aswell as the usage cost

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.

So a fixed cost that is not fixed? :slight_smile:

Kind of like the option we have now (“use an entity”), but added daily?

Hmm perhaps I should make a new post for this :sweat_smile:

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

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

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?

Absolutely. You can do that.

Same, UK has a ‘standing charge’ per day on top of usage.

2 Likes

+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.

Vote here… UK standing charges are a thing… Just a fixed cost in pence per day.

1 Like

For gas I have three cost variables.

  1. Rate per Ccf (I have to convert to ft³ see post below)
  2. Daily Customer Charge
  3. 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.

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

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

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.

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… :wink:

There are the sensors of my Solars Panels. Consumption is the kwh from grid to the house and export house to grid.