Utility Meter - set tariff cost

Hey everyone,
long time lurker, first time poster :slight_smile: . After using HA for about 2 years finally got some energy monitoring sockets, but I’m having trouble setting up the Grid Consumption. I think I’m not getting the concept of what type of entity needs to be set so I’m looking for some help. I’ve read 8-9 other posts here but they all seem to be for a different configuration issue and reading the docs doesn’t help me.

Hadrware: 4 energy monitoring plugs/sockets (nothing that monitors the actual total house consumption)

The sockets themselves provide a whole bunch of data including Power(current use) in Watts and Total/TotalDaily (cumulative) in kWh. What I did was create a helper that sums up the TotalDaily for the 4 sockets into a single value as I wanted to use that value as a “whole home” consumption reading(lets call it HomeTotal).

I created a Utility Meter helper with Input Sensor: HomeTotal and Supported Tariffs: Day, Night. This created 3 entities(+2 invisible ones). One is select_tariff and two separate ones for the Day_rate(kWh) and Night_rate(kWh). In Developer Tools/States I found that there are 2 more entities listed that don’t show up in the Settings/Entities or Helpers(not sure why) - Day_Cost and Night_Cost, however I’m not sure how to set their values. That is problem #1

For problem #2, am I wrong in trying to add Grid Consumption like this:
Consumed Energy: HomeTotal
Use entity with current price: Here is where I thought I would use the select_tariff helper entity that would provide the price based on whether my automation had set it to either Day or Night, but obviously I’m doing something wrong because the Select entity is not available to choose.

I tried an alternative configuration as well

Consumed Energy: Day_rate(kWh)
Use entity with current price: Day_Cost

But obviously since I’m not able to set a value for Day_Cost that isn’t working either.

In case it isn’t clear I’ll try to sum up what I’m trying to achieve - get a combined sum reading of the 4 sockets that will allow me to see how much electricity I’ve used per day and calculate the costs based on my dual tariff meter - day(peak)/night(offpeak) pricing.

If you have any pointers as to what I’m doing wrong or any misconceptions, it’ll be greatly appreciated.

Please share the configuration for this. It likely requires an availability template or your utility meter could get rather large jumps in value.

No idea where they came from. My utility meter with peak and offpeak tariffs does not create them. What sort of entities are they?

My utility meter was set up in yaml, so that may be the difference?

No.

That select entity is only for changing the utility meter tariff. So you can write an automation to switch the tariff at the beginning of the day and night.

For the “use an entity with current price” you can create a couple of input number helpers and set their value to the current $/kWh you are charged for day and night then use those in the energy dashboard settings.

Or if you don’t expect these to change often you can just enter the static price option directly in the energy dashboard settings.

1 Like

Thanks a lot for you reply!
I’ve puled this config from .storage as I created the helper through GUI

{
        "entry_id": "3bbe0f170dc24a049f7da0a03d557d87",
        "version": 1,
        "domain": "min_max",
        "title": "Total Home Energy Consumption",
        "data": {},
        "options": {
          "name": "Total Home Energy Consumption",
          "entity_ids": [
            "sensor.bedside_plug_energy_today",
            "sensor.livingroom_em_plug_energy_today",
            "sensor.networking_plug_energy_today",
            "sensor.pc_desk_plug_energy_today"
          ],
          "type": "sum",
          "round_digits": 2.0
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }

Here are how the Utility Meter look like in Helpers vs DevTools (bord gais is the name of the electricity company) as well as the config again from .storage :

(posting DevTools screenshot in a separate post as I’m limited to 1 pic per post as a new user :slight_smile: )

{
        "entry_id": "50d5e0ce522e42251972b9e44a8cc231",
        "version": 1,
        "domain": "utility_meter",
        "title": "Bord Gais Tariffs",
        "data": {},
        "options": {
          "name": "Bord Gais Tariffs",
          "source": "sensor.total_home_energy_consumption",
          "cycle": "bimonthly",
          "offset": 17.0,
          "tariffs": [
            "Day Rate",
            "Night Rate"
          ],
          "net_consumption": false,
          "delta_values": false
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      },

What I ended up doing is, instead of trying to add TotalHome as the source in the Grid Consumption and then vary its price based on the selector, I added the DayRate and NightRate as two separate entries and set their price as static values and that seems to have updated the DayRateCost and NightRateCost sensors, although the values appear to be incorrect. Here’s how I’ve set them up

(posting Energy Dashboard screenshot in a separate post as I’m limited to 1 pic per post as a new user :slight_smile: )

Currently running:
Home Assistant 2023.1.4
Supervisor 2022.12.1
Operating System 9.4

I think I’m not getting how it’s supposed to work, so I’m pretty sure I’m not putting the right entries in the correct place.

DevTools

1 Like

Energy Dashboard

Ah! Those hidden cost entities are explained here:

That’s a nice find, thank you. I don’t remember setting static price prior to making the screenshot above, but I could have done it while trying to figure out how it works.

Anyway, now I seem to have a working dashboard, It’s just not exactly the way I expected it to look as it lists the two tariffs as separate entities on the graph(i’m fine with the table below). I haven’t really seen someone else’s dashboard with dual tariffs though, so perhaps this IS the way it should look/work

1 Like

That is the way it should look. You can see when you are using day and night rates.

Thanks again due the help. I guess I just expected it to work in a different way :sweat_smile:

Trying to create something similar for my Electric Ireland 3 tariffs - how did you created these helpers? especially cost of the tariff.