Energy: Add fixed daily cost

Plus 1 for daily standing charge option- used by energy companies in Ireland.

That looks great. How well does it feed into the energy dashboard?

Feeds in perfectly. I use the daily cost and usage which isn’t to far out to what my provider is showing.

1 Like

My energy dashboard (this is based on @sean.mcgee’s solution, but modified to be 0.001kWh per daily charge instead of 1kWh… so it doesn’t skew the charts):

how you did it, we have the same system in my country and I need to know how for my project.

As above.
I added two helpers to set both tariffs.
Another helper to set the “first target value” ( for me, its the first 2kwh at high price, then remaining at low price)

I then have a template to switch over to tariff two once the 2kwh has been reached

can you explain to me step by step, which type of helper u are used and what you did with automation because just I used home assistant from week ago

Hi, apologies for the late reply but I’ve done a step by step ‘how-to’ - HERE

Please let me know your thoughts… Hope it helps!

Unfortunately, i am getting an error

2022-05-08 19:37:00 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'as_timestamp' got invalid input 'unknown' when rendering template '{{ (((as_timestamp(states
('sensor.date_time_iso')) / 3600)-1652016564) | int) / 1000}}' but no default was specified. Currently 'as_timestamp' will return 'None', however this template will fail to render in Ho
me Assistant core 2022.6

My template is:

  - name: "Fixed Charges"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
    state: >-
      {{ (((as_timestamp(states('sensor.date_time_iso')) / 3600)-1652016564) | int) / 1000}}

    attributes:
      last_reset: '1970-01-01T00:00:00+00:00'

With a simple “Fixed cost total entity” could be enough.

Each user is responsable to increase the value according with his conditions, as other values.

Only we need a additional row without unit, only the cost.

yes please!

Yes Please

I would like this too. Seems like a simple feature to add.

Also the case in New Zealand.

This would be great in the UK - and the integration from GitHub - HandyHat/ha-hildebrandglow-dcc: Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API provides a daily standing charge rate sensor which it gets direct from the supplier.

Agreed, even have a customizable ‘static’ additional daily/monthy or configurable period to add to the energy cost dashboard.

So define if it’s daily, weekly or monthly and then the value to add per that period. Then when to apply, at the end of the period (24h for a day, at the start or end of the day or even a calculated field to apply it per period)

Adding a daily charge is something that can be done in your tariff / utility meter setup.
Here’s what I’m using to calculate the cost of import / exported, then calculate the correct tier (peak / shoulder / off-peak) that should be used for that time of day and then add in the daily connection fee and work out the current daily cost for power for that day.

See: Home-Assistant/energy_tariff_TOU_solar_analytics.yaml at 4fd711b2ac24cf1893a039919bbe6889a06b2681 · Roving-Ronin/Home-Assistant · GitHub

I’m using Solar Analytics as the data source for kW etc, but just update it to whatever your using (which btw should be the cumulative import / export costs, not the daily/todays like I have…side issue being flagged atm for SA integration to fix).

This is based upon original code by SgtBatten, and I still have to get a chance to also work up a version that supports peak / shoulder / off-peak + demand based fee (charged based on the highest 30min kWh consumption during peak hours for the month x a per kWh demand fee).

1 Like

i can agree that for charge per kWh you shoud use automations / integrations. Too many variants across countries.

but i think if even a additional daily fixed cost what could be added to Power, Water and Gas would fix the need for most cases.

so my vote would be also to have the same settings additional that is time based. Reading description of users above this would fit the most cases. (if you have to pay montlhy or hourly)
and for the price give us the same options as the ones that we have for the working prices

I used the same kind of trick as @muzzak, by creating two sensors counting upwards 0.01 kwh and 0.01 m3 each day. This way you can give your fixed daily energy company charge in cents per day.

I run into the same issues as @trumee , but this was because I didn’t had the time_date integration activated.

To help others, this is my config in the configuration.yaml

sensor:
  - platform: time_date
    display_options:
      - 'date_time_iso'

template:
  - sensor:
    - name: "Daily Energy Supply Charge"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing
      state: "{{ (((as_timestamp(states('sensor.date_time_iso')) / 3600) - 454585) | int) / 2400 }}"
      attributes:
        last_reset: '1970-01-01T00:00:00+00:00'

  - sensor:
    - name: "Daily Gas Supply Charge"
      unit_of_measurement: "m³"
      device_class: gas
      state_class: total_increasing
      state: "{{ (((as_timestamp(states('sensor.date_time_iso')) / 3600) - 454585) | int) / 2400 }}"
      attributes:
        last_reset: '1970-01-01T00:00:00+00:00'

For the Dutch ANWB Energie (in 2023) the daily charge in euro-cents are:
electricity:-45,61 (negative because of Dutch energy tax return)
gas: 69,58

results into:

Hope this helps others

5 Likes

As a HA beginner, this helped me a lot, thank you very much!
i just recently moved to nl…
This are my daily/yearly costs:
Gas:
€ 0,46090 per dag + € 67,36 per jaar
Electricity:
€ 0,73790 per dag + € 67,36 per jaar
This is without btw…
I think i have a bad contract :confused: