2 Tariffs of my 3 Tariff Utility Meter are incrementing at the same time

I am on a 3 tariff time of use plan with my energy provider.
Using the Add Helper function of the HA graphical user interface, I added a utility meter with 3 tariffs.
I added an automation to select the appropriate tariff depending on the time of day.
After using the calibration service, I noticed that two of the three tariffs are incrementing their energy count at the same time even though only one is in the Accumulation mode, while the other two are in the Pause mode.

I ran the calibration service again this morning (Set Cheio to 2259, and Vazio to 4670), and still see two tariffs incrementing.

What could I be doing wrong? Where should I check first?
How does the calibration service work, and how should it be applied? Does it just add an offset to the meter to initialize it with the energy provider’s meter, or does it also scale to the incrementing rate of the provider’s meter?


The automation just switched to the Ponte period. The Cheio meter stopped incrementing, the Ponte meter started incrementing, but the Vazio meter continues to increment with the Ponte meter. The Vazio meter never stops incrementing even though its Status attribute says Paused.

Now that the Vazio period has started, only the Vazio meter is incrementing. Will have to wait until tomorrow morning when the next Cheio period starts, to see if the Vazio meter stops incrementing.

At 8:00 Vazio period ended, and Cheio period started. The Cheio meter started incrementing as expected, but the Vazio meter also continued incrementing.


@dgomes Any thoughts on what could cause this?

Hi @JeffersM

Can you share the automations you are using to change the tariff select

BTW: if I’m not mistaken, you are in Portugal, and you can use GitHub - dgomes/ha_erse: Home Assistant Custom Component for ERSE to automate the transitions and as bonus calculate the costs

Yes, I am in Portugal, and thanks for pointing me to the to the resource. This is the automation that I cobble together:

alias: Grid Meter
description: ""
trigger:
  - platform: time
    at: "22:00:00"
    alias: EDP Vazio Period Start 22:00 (Year Round)
    id: Vazio
  - platform: time
    at: "08:00:00"
    alias: EDP Cheio Period Start 08:00 (Year Round)
    id: Cheio 1
  - platform: time
    at: "10:30:00"
    alias: EDP Ponte Period Start 10:30 (VerĂŁo) or Cheio Period Start 10:30 (Inverno)
    id: Ponte 1 (VerĂŁo) or Cheio 2 (Inverno)
  - platform: time
    at: "13:00:00"
    alias: EDP Cheio Period Start 13:00 (VerĂŁo)
    id: Cheio 2 (VerĂŁo)
  - platform: time
    at: "19:30:00"
    alias: EDP Ponte Period Start 19:30 (VerĂŁo)
    id: Ponte 2 (VerĂŁo)
  - platform: time
    at: "21:00:00"
    id: Cheio 3 (VerĂŁo)
    alias: EDP Cheio Period Start 21:00 (VerĂŁo)
  - platform: time
    at: "09:00:00"
    alias: EDP Ponte Period Start 09:00 (Inverno)
    id: Ponte 1 (Inverno)
  - platform: time
    at: "10:30:00"
    alias: EDP Cheio Period Start 10:30 (Inverno)
    id: Cheio 2 (Inverno)
    enabled: false
  - platform: time
    at: "18:00:00"
    alias: EDP Ponte Period Start 18:00 (Inverno)
    id: Ponte 2 (Inverno)
  - platform: time
    at: "20:30:00"
    alias: EDP Cheio Period Start 20:30 (Inverno)
    id: Cheio 3 (Inverno)
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Vazio
        sequence:
          - service: select.select_option
            data:
              option: Vazio
            target:
              entity_id: select.grid_power
            alias: Select Grid Power Vazio Tariff
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: Cheio 1
              - condition: and
                conditions:
                  - condition: state
                    entity_id: binary_sensor.is_dst
                    state: "on"
                    alias: VerĂŁo (DST is in effect)
                  - condition: or
                    conditions:
                      - condition: trigger
                        id: Ponte 1 (VerĂŁo) or Cheio 2 (Inverno)
                      - condition: trigger
                        id: Cheio 3 (VerĂŁo)
                alias: Cheio VerĂŁo
              - condition: and
                conditions:
                  - condition: state
                    entity_id: binary_sensor.is_dst
                    state: "off"
                    alias: Inverno (DST is not in effect)
                  - condition: or
                    conditions:
                      - condition: trigger
                        id: Cheio 2 (Inverno)
                      - condition: trigger
                        id: Cheio 3 (Inverno)
                alias: Cheio Inverno
            alias: Cheio
        sequence:
          - service: select.select_option
            data:
              option: Cheio
            target:
              entity_id: select.grid_power
            alias: Select Grid Power Cheio Tariff
      - conditions:
          - condition: or
            conditions:
              - condition: and
                conditions:
                  - condition: state
                    entity_id: binary_sensor.is_dst
                    state: "on"
                    alias: VerĂŁo (DST is in effect)
                  - condition: or
                    conditions:
                      - condition: trigger
                        id: Ponte 1 (VerĂŁo)
                      - condition: trigger
                        id: Ponte 2 (VerĂŁo)
                    alias: Ponte VerĂŁo Periods
                alias: Ponte VerĂŁo
              - condition: and
                conditions:
                  - condition: state
                    entity_id: binary_sensor.is_dst
                    state: "off"
                    alias: Inverno (DST is not in effect)
                  - condition: or
                    conditions:
                      - condition: trigger
                        id: Ponte 1 (VerĂŁo) or Cheio 2 (Inverno)
                      - condition: trigger
                        id: Ponte 2 (Inverno)
                    alias: Ponte Inverno Periods
                alias: Ponte Inverno
            alias: Ponte
        sequence:
          - service: select.select_option
            data:
              option: Ponte
            target:
              entity_id: select.grid_power
            alias: Select Grid Power Ponte Tariff
    alias: "Choose Tariff: Vazio, Cheio, or Ponte"
  - service: utility_meter.reset
    data: {}
    target:
      entity_id: select.grid_power
    enabled: false
  - service: utility_meter.calibrate
    data: {}
    target:
      entity_id:
        - sensor.grid_power_vazio
    enabled: false
  - service: utility_meter.calibrate
    data:
      value: "846"
    target:
      entity_id: sensor.grid_power_ponte
    enabled: false
  - service: utility_meter.calibrate
    data:
      value: "2259"
    target:
      entity_id: sensor.grid_power_cheio
    enabled: false
mode: single

Yes… that automation if very complex and prone to errors, please use my custom_component :wink: it will make things easier and will evenly sort this issue out.

Thanks. I will use your custom component.

In the readme file in GitHub I see: " Go to Service >> Integrations in the UI. Click the button with + sign on the integrations page and from the list of integrations, select ERSE ." I don’t find ERSE in the pull down list. Do I need to add that repository somewhere?

I have a Studer brand inverter for my solar PV system. My son was able to pull data from it using the Studer supplied API and the Restful Sensor integration, but the API is for accessing the cloud. Do you know of anyone that has been able to communicate locally with Studer inverters?

I am also in the market for a heat pump based sanitary water heater. Do you know of any that are locally available that have been integrated with HA?

ERSE is a custom_component that you can find through HACS

Don’t know anything about Studer Inverters :frowning: better you search here in the community. Heatpump’s, better also search here for users feedback (my LG has no connectivity :frowning: )

1 Like

Thanks. Does your LG have dry contact input to command it to heat to a higher temp when HA commands it to, and a place to put a temperature probe for HA to monitor the temperature?

Not sure, in my install the it keeps a buffer storage at programmed temperature (using an HMI).

I then have a water pump that circulates that water from the storage through my underfloor pipes (that pump I control using HA)

I also has a temperature probe in my Domestic Water storage and the HeatPump decides on itself to heat the deposit or not based on that probe.

There are better solutions out there if you are buying new

It looks like the vazio meter has stopped incrementing all of the time, but at 18:00, Ponta should have been selected and instead, Cheio stayed selected. Previously in the cost options window of the ERSE integration, I had mistakenly put the Cheio cost in the day cost field, the Vazio cost in the Vazio cost, and the Ponta cost in the Cheias, and left the last one blank. I think in the initial setup window, that last field wasn’t named so I didn’t know that I need to populate it.

On the cost options window, I’m not sure about what goes in the first field “Cost of Power (day)*” which I have left as 0 for now. Is this the day of the month that the supplier calculates the bill on?

image

For the energy dashboard, I am pulling inverter data from the cloud, but sometimes run into problems with dropouts. Sometimes the value comes back as “unavailable”, but sometimes as 0 which can really mess up the calculations like the Hourly PV kWh production. The Studer cloud seems to be buggy as I have similar problems with the Studer reporting web, and the Studer mobile app. I have seen others complain of similar problems with other cloud based data pulls. I tried an outlier filter, but didn’t have luck with it. Can you recommend a filter that I could try that would ignore dropouts to 0?

I Just found that I had misspelled Cheias and Ponta, so I re-ran the Utility Meter helper to correct those spelling errors. I will wait and see if the rate selection is corrected.

I ran into a problem with the Utility Meter helper. It is only creating a single meter instead of one for each tariff. When I populate the tariff field with the three tariffs separated by commas, the tariff entry is erased as soon as I click anywhere else on the Utility Meter helper window. So they are likely also erasing when I click the submit button.

“Cost of Power” is the fix amount the Power Company charges daily (“Custo Potencia Contratada”)

Those unavailable values can be filtered out using a Template Sensor.

Utility Meter will not create all sensors immediately, only when each tariff is first used will the sensor be created.

Don’t know if you speak Portuguese, but there’s a Portuguese HA community at https://cpha.pt

My Portuguese is very poor and limited. But this could be a good opportunity to improve several things at the same time. Thanks for the link. On your recommendation, I have joined the group and have already found it to be very useful.

1 Like